summaryrefslogtreecommitdiff
path: root/src/Fl_x.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2012-06-21 08:52:29 +0000
committerManolo Gouy <Manolo>2012-06-21 08:52:29 +0000
commitcbcf0c931278671f4db01ff384f4973a7be322eb (patch)
treefa4a8e55e83baa159a9ced51a61271c58520288a /src/Fl_x.cxx
parent27e406f7512c0e922bc040568331efe30e0838de (diff)
Fixed STR #2644: support horizontal wheel movement under X11 and MSWindows.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9624 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_x.cxx')
-rw-r--r--src/Fl_x.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx
index ef3906a4e..fa48e5fef 100644
--- a/src/Fl_x.cxx
+++ b/src/Fl_x.cxx
@@ -1506,12 +1506,19 @@ int fl_handle(const XEvent& thisevent)
case ButtonPress:
Fl::e_keysym = FL_Button + xevent.xbutton.button;
set_event_xy();
+ Fl::e_dx = Fl::e_dy = 0;
if (xevent.xbutton.button == Button4) {
Fl::e_dy = -1; // Up
event = FL_MOUSEWHEEL;
} else if (xevent.xbutton.button == Button5) {
Fl::e_dy = +1; // Down
event = FL_MOUSEWHEEL;
+ } else if (xevent.xbutton.button == 6) {
+ Fl::e_dx = -1; // Left
+ event = FL_MOUSEWHEEL;
+ } else if (xevent.xbutton.button == 7) {
+ Fl::e_dx = +1; // Right
+ event = FL_MOUSEWHEEL;
} else {
Fl::e_state |= (FL_BUTTON1 << (xevent.xbutton.button-1));
event = FL_PUSH;