summaryrefslogtreecommitdiffstats
path: root/vncviewer
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2011-05-24 11:33:43 +0000
committerPierre Ossman <ossman@cendio.se>2011-05-24 11:33:43 +0000
commitdf0ed9f731b2494677651ff5c0bebcf989cbb8b3 (patch)
treef6068e96537b193cffa9d7fea1c8223d10214355 /vncviewer
parent7e590a9d3751e4c806735b37d5dac497e9c7fdf6 (diff)
downloadtigervnc-df0ed9f731b2494677651ff5c0bebcf989cbb8b3.tar.gz
tigervnc-df0ed9f731b2494677651ff5c0bebcf989cbb8b3.zip
Handle horizontal wheel events and not just vertical.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4443 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'vncviewer')
-rw-r--r--vncviewer/Viewport.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/vncviewer/Viewport.cxx b/vncviewer/Viewport.cxx
index 5b5f5bba..1d90f066 100644
--- a/vncviewer/Viewport.cxx
+++ b/vncviewer/Viewport.cxx
@@ -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