]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix reporting of horizontal scroll bar buttons on Haiku
authorPo Lu <luangruo@yahoo.com>
Sat, 26 Feb 2022 07:06:55 +0000 (07:06 +0000)
committerPo Lu <luangruo@yahoo.com>
Sat, 26 Feb 2022 07:06:55 +0000 (07:06 +0000)
* haikuterm.c (haiku_read_socket): Use correct values for scroll
bar buttons when the scroll bar is horizontal.

src/haikuterm.c

index badc3f5801d203b020f64f9da6273c2b43055399..357ec8239c5d922405f9ba7e186b0811885c3ef8 100644 (file)
@@ -3163,10 +3163,14 @@ haiku_read_socket (struct terminal *terminal, struct input_event *hold_quit)
            switch (b->part)
              {
              case HAIKU_SCROLL_BAR_UP_BUTTON:
-               inev.part = scroll_bar_up_arrow;
+               inev.part = (bar->horizontal
+                            ? scroll_bar_left_arrow
+                            : scroll_bar_up_arrow);
                break;
              case HAIKU_SCROLL_BAR_DOWN_BUTTON:
-               inev.part = scroll_bar_down_arrow;
+               inev.part = (bar->horizontal
+                            ? scroll_bar_right_arrow
+                            : scroll_bar_down_arrow);
                break;
              }