diff options
author | Pierre Ossman <ossman@cendio.se> | 2011-05-24 11:33:43 +0000 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2011-05-24 11:33:43 +0000 |
commit | df0ed9f731b2494677651ff5c0bebcf989cbb8b3 (patch) | |
tree | f6068e96537b193cffa9d7fea1c8223d10214355 /vncviewer | |
parent | 7e590a9d3751e4c806735b37d5dac497e9c7fdf6 (diff) | |
download | tigervnc-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.cxx | 11 |
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 |