]> source.dussan.org Git - tigervnc.git/commitdiff
Handle horizontal wheel events and not just vertical.
authorPierre Ossman <ossman@cendio.se>
Tue, 24 May 2011 11:33:43 +0000 (11:33 +0000)
committerPierre Ossman <ossman@cendio.se>
Tue, 24 May 2011 11:33:43 +0000 (11:33 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4443 3789f03b-4d11-0410-bbf8-ca57d06f2519

vncviewer/Viewport.cxx

index 5b5f5bba24be7c40d88cabe9e3fbe1f953522243..1d90f066ace9810bcc2ea5e6bcf59a2fd845be0e 100644 (file)
@@ -215,10 +215,15 @@ int Viewport::handle(int event)
       buttonMask |= 4;
 
     if (event == FL_MOUSEWHEEL) {
+      wheelMask = 0;
       if (Fl::event_dy() < 0)
-        wheelMask = 8;
-      else
-        wheelMask = 16;
+        wheelMask |= 8;
+      if (Fl::event_dy() > 0)
+        wheelMask |= 16;
+      if (Fl::event_dx() < 0)
+        wheelMask |= 32;
+      if (Fl::event_dx() > 0)
+        wheelMask |= 64;
 
       // A quick press of the wheel "button", followed by a immediate
       // release below