summaryrefslogtreecommitdiff
path: root/src/Fl_x.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2001-08-02 20:09:25 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2001-08-02 20:09:25 +0000
commit2d3fd88eeb985c2d4cdb9659767fd0d970631ce8 (patch)
treefbe45b470d4eb1079578a0877cebfddf2d4c7d03 /src/Fl_x.cxx
parent9d81d971f7861da5f558ecd797cf0aa575288dc9 (diff)
More mouse wheel stuff (as compatible as possible with the 2.0 code...)
Updated the makefile to use config.status --recheck before calling config.status (why they can't provide one that does both, I don't know...) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1540 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_x.cxx')
-rw-r--r--src/Fl_x.cxx19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx
index 8905e0f40..63441ef4c 100644
--- a/src/Fl_x.cxx
+++ b/src/Fl_x.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_x.cxx,v 1.24.2.24 2001/04/27 14:39:27 easysw Exp $"
+// "$Id: Fl_x.cxx,v 1.24.2.24.2.1 2001/08/02 20:09:25 easysw Exp $"
//
// X specific code for the Fast Light Tool Kit (FLTK).
//
@@ -448,9 +448,18 @@ int fl_handle(const XEvent& xevent)
case ButtonPress:
Fl::e_keysym = FL_Button + xevent.xbutton.button;
- set_event_xy(); checkdouble();
- Fl::e_state |= (FL_BUTTON1 << (xevent.xbutton.button-1));
- event = FL_PUSH;
+ set_event_xy();
+ if (xevent.xbutton.button == 4) {
+ Fl::e_dy = +1;
+ event = FL_MOUSEWHEEL;
+ } else if (xevent.xbutton.button == 5) {
+ Fl::e_dy = -1;
+ event = FL_MOUSEWHEEL;
+ } else {
+ Fl::e_state |= (FL_BUTTON1 << (xevent.xbutton.button-1));
+ event = FL_PUSH;
+ checkdouble();
+ }
break;
case MotionNotify:
@@ -918,5 +927,5 @@ void Fl_Window::make_current() {
#endif
//
-// End of "$Id: Fl_x.cxx,v 1.24.2.24 2001/04/27 14:39:27 easysw Exp $".
+// End of "$Id: Fl_x.cxx,v 1.24.2.24.2.1 2001/08/02 20:09:25 easysw Exp $".
//