diff options
author | Pierre Ossman <ossman@cendio.se> | 2011-11-17 10:19:19 +0000 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2011-11-17 10:19:19 +0000 |
commit | 53fd544c2f68b2ff97fb3f5e60734b281ce75ad3 (patch) | |
tree | 6756980b70f0b5eeeb62e9811daff00f266be86f | |
parent | aa73c89d77088b64225d73cf37597c68e201088e (diff) | |
download | tigervnc-53fd544c2f68b2ff97fb3f5e60734b281ce75ad3.tar.gz tigervnc-53fd544c2f68b2ff97fb3f5e60734b281ce75ad3.zip |
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.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4808 3789f03b-4d11-0410-bbf8-ca57d06f2519
-rw-r--r-- | vncviewer/DesktopWindow.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/vncviewer/DesktopWindow.cxx b/vncviewer/DesktopWindow.cxx index abd38c92..41abf6be 100644 --- a/vncviewer/DesktopWindow.cxx +++ b/vncviewer/DesktopWindow.cxx @@ -332,6 +332,16 @@ void DesktopWindow::grabKeyboard() 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 @@ void DesktopWindow::ungrabKeyboard() if (Fl::grab()) return; + XUngrabPointer(fl_display, fl_event_time); XUngrabKeyboard(fl_display, fl_event_time); #endif } |