FLTK logo

[Library] r5750 - trunk/src/x11

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[Library] r5750 - trunk/src/x11 fltk-dev Mar 20, 2007  
 
Author: spitzak
Date: 2007-03-20 07:53:33 -0500 (Tue, 20 Mar 2007)
New Revision: 5750
Log:
It was impossible to click the middle mouse button on X11 if that was
also a mouse wheel, as wheel movement turned off the is-click
indicator.


Modified:
   trunk/src/x11/run.cxx

Modified: trunk/src/x11/run.cxx
===================================================================
--- trunk/src/x11/run.cxx	2007-03-20 10:41:14 UTC (rev 5749)
+++ trunk/src/x11/run.cxx	2007-03-20 12:53:33 UTC (rev 5750)
@@ -974,8 +974,6 @@
 }
 
 bool fltk::enable_tablet_events() {
-  e_pressure = 0.0f; // indicate uninitialised data
-  e_x_tilt = e_y_tilt = 0.0f;
   open_display();
   // check if there is an XInput extension on this machine
   XExtensionVersion	*version;
@@ -1496,13 +1494,6 @@
     unsigned n = xevent.xbutton.button;
     e_keysym = n;
     set_event_xy(true);
-    // turn off is_click if enough time or mouse movement has passed:
-    if (e_is_click == e_keysym) {
-      e_clicks++;
-    } else {
-      e_clicks = 0;
-      e_is_click = e_keysym;
-    }
     if (n == wheel_up_button) {
       e_dy = -1;
       event = MOUSEWHEEL;
@@ -1510,6 +1501,13 @@
       e_dy = +1;
       event = MOUSEWHEEL;
     } else {
+      // turn off is_click if enough time or mouse movement has passed:
+      if (e_is_click == e_keysym) {
+        e_clicks++;
+      } else {
+        e_clicks = 0;
+        e_is_click = e_keysym;
+      }
       e_state |= BUTTON(n);
       event = PUSH;
     }}

Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.