From: Pierre Ossman Date: Tue, 24 May 2011 11:33:43 +0000 (+0000) Subject: Handle horizontal wheel events and not just vertical. X-Git-Tag: v1.1.90~335 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=df0ed9f731b2494677651ff5c0bebcf989cbb8b3;p=tigervnc.git 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 --- 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