Browse Source

X11: Add support for horizontal mouse scroll axis input.

tags/v1.3.1000
Jonathan Moore Liles 13 years ago
parent
commit
601f1c13ec
1 changed files with 9 additions and 1 deletions
  1. +9
    -1
      src/Fl_x.cxx

+ 9
- 1
src/Fl_x.cxx View File

@@ -1466,6 +1466,12 @@ int fl_handle(const XEvent& thisevent)
} 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;
@@ -1494,7 +1500,9 @@ int fl_handle(const XEvent& thisevent)
set_event_xy();
Fl::e_state &= ~(FL_BUTTON1 << (xevent.xbutton.button-1));
if (xevent.xbutton.button == Button4 ||
xevent.xbutton.button == Button5) return 0;
xevent.xbutton.button == Button5 ||
xevent.xbutton.button == 6 ||
xevent.xbutton.button == 7) return 0;
event = FL_RELEASE;

fl_xmousewin = window;


Loading…
Cancel
Save