From df0ed9f731b2494677651ff5c0bebcf989cbb8b3 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 24 May 2011 11:33:43 +0000 Subject: [PATCH] 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 --- vncviewer/Viewport.cxx | 11 ++++++++--- 1 file 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 -- 2.39.5