]> source.dussan.org Git - tigervnc.git/commitdiff
Need to adjust mouse coordinates now that we can move the widget around.
authorPierre Ossman <ossman@cendio.se>
Fri, 15 Apr 2011 12:57:31 +0000 (12:57 +0000)
committerPierre Ossman <ossman@cendio.se>
Fri, 15 Apr 2011 12:57:31 +0000 (12:57 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4373 3789f03b-4d11-0410-bbf8-ca57d06f2519

vncviewer/Viewport.cxx

index 8150b04b43e27ba369d96a5a84536e73059b1475..4d8bd2a5f9beebec834f80050e3d55124836c748 100644 (file)
@@ -186,11 +186,11 @@ int Viewport::handle(int event)
 
       // A quick press of the wheel "button", followed by a immediate
       // release below
-      handlePointerEvent(Point(Fl::event_x(), Fl::event_y()),
+      handlePointerEvent(Point(Fl::event_x() - x(), Fl::event_y() - y()),
                          buttonMask | wheelMask);
     } 
 
-    handlePointerEvent(Point(Fl::event_x(), Fl::event_y()), buttonMask);
+    handlePointerEvent(Point(Fl::event_x() - x(), Fl::event_y() - y()), buttonMask);
     return 1;
 
   case FL_FOCUS: