Revision: 4808
          http://tigervnc.svn.sourceforge.net/tigervnc/?rev=4808&view=rev
Author:   ossman_
Date:     2011-11-17 10:19:19 +0000 (Thu, 17 Nov 2011)
Log Message:
-----------
Also grab the mouse pointer in full screen as some window managers like to
do special things with buttons combined with modifiers. The user probably
wants to propagate these to the server though.

Modified Paths:
--------------
    trunk/vncviewer/DesktopWindow.cxx

Modified: trunk/vncviewer/DesktopWindow.cxx
===================================================================
--- trunk/vncviewer/DesktopWindow.cxx   2011-11-15 12:26:30 UTC (rev 4807)
+++ trunk/vncviewer/DesktopWindow.cxx   2011-11-17 10:19:19 UTC (rev 4808)
@@ -332,6 +332,16 @@
       vlog.error(_("Failure grabbing keyboard"));
     }
   }
+
+  // We also need to grab the pointer as some WMs like to grab buttons
+  // combined with modifies (e.g. Alt+Button0 in metacity).
+  ret = XGrabPointer(fl_display, fl_xid(this), True,
+                     ButtonPressMask|ButtonReleaseMask|
+                     ButtonMotionMask|PointerMotionMask,
+                     GrabModeAsync, GrabModeAsync,
+                     None, None, CurrentTime);
+  if (ret)
+    vlog.error(_("Failure grabbing mouse"));
 #endif
 }
 
@@ -349,6 +359,7 @@
   if (Fl::grab())
     return;
 
+  XUngrabPointer(fl_display, fl_event_time);
   XUngrabKeyboard(fl_display, fl_event_time);
 #endif
 }

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Tigervnc-commits mailing list
Tigervnc-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-commits

Reply via email to