After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 488264 - keybord grab problem under compiz
keybord grab problem under compiz
Status: RESOLVED NOTGNOME
Product: gnome-screensaver
Classification: Deprecated
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-screensaver maintainers
gnome-screensaver maintainers
: 500359 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-10-19 13:48 UTC by Michael Vogt
Modified: 2008-01-29 02:50 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michael Vogt 2007-10-19 13:48:26 UTC
If compiz is used and "Unredirected Fullscreen mode" is turned on the gnome-screensaver keybord grab does not work. Its possible to input into (hidden) windows then. 

My current understanding is that when compiz finds a fullscreen window, it calls "XCompositeUnredirectWindow()" on it. This seems to have a side effect that breaks the keybord lock for some reason without gnome-screensavers noticing (no GdkEventGrabBroken is sent). So it assume it has the keyboard grab already, when in fact it does not have it (anymore):

[gs_grab_move_keyboard] gs-grab-x11.c:324 (00:41:01): Window 2200024 is already grabbed, skipping
[gs_grab_move_mouse] gs-grab-x11.c:264 (00:41:01): Window 2200024 is already grabbed, skipping

my proposed fix changes the code so that it will always (re)grab the keyboard when the unlock dialog comes up.

diff -u ref/gnome-screensaver-2.20.0/src/gs-manager.c gnome-screensaver-2.20.0/src/gs-manager.c
--- ref/gnome-screensaver-2.20.0/src/gs-manager.c	2007-10-17 21:42:29.000000000 +0200
+++ gnome-screensaver-2.20.0/src/gs-manager.c	2007-10-17 21:25:29.000000000 +0200
@@ -1050,7 +1050,7 @@
         }
 
         /* Move keyboard and mouse grabs so dialog can be used */
-        gs_grab_move_to_window (manager->priv->grab,
+        gs_grab_grab_window (manager->priv->grab,
                                 gs_window_get_gdk_window (window),
                                 gs_window_get_screen (window),
                                 FALSE);




This is reported on ubuntu as https://bugs.edge.launchpad.net/ubuntu/+source/gnome-screensaver/+bug/145123

Please let me know what you think about this. I'm happy to provide more logs if required.

Thanks,
 Michael
Comment 1 Ray Strode [halfline] 2007-10-24 15:11:46 UTC
downstream Fedora report:

https://bugzilla.redhat.com/show_bug.cgi?id=350271
Comment 2 Ray Strode [halfline] 2007-10-24 15:13:35 UTC
This fix can't be right.  if gnome-screensaver doesn't have a keyboard grab then something else could take the grab before the lock dialog comes up.

if XCompositeUnredirectWindow breaks active keyboard grabs then this has to be a bug in the X server.
Comment 3 Kristian Høgsberg 2008-01-17 02:58:50 UTC
This commit:

http://cgit.freedesktop.org/xorg/xserver/commit/?id=a6a7fadbb03ee99312dfb15ac478ab3c414c1c0b

fixes the xserver behaviour where it breaks grabs as a side effect of redirecting/unredirecting windows.
Comment 4 William Jon McCann 2008-01-29 02:47:26 UTC
Thanks Kristian.  Resolving as NOTGNOME.
Comment 5 William Jon McCann 2008-01-29 02:50:15 UTC
*** Bug 500359 has been marked as a duplicate of this bug. ***