GNOME Bugzilla – Bug 488264
keybord grab problem under compiz
Last modified: 2008-01-29 02:50:15 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
downstream Fedora report: https://bugzilla.redhat.com/show_bug.cgi?id=350271
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.
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.
Thanks Kristian. Resolving as NOTGNOME.
*** Bug 500359 has been marked as a duplicate of this bug. ***