Comment 31 for bug 49579

Revision history for this message
Marc Deslauriers (mdeslaur) wrote : Re: screen doesn't lock when panel menu is open

This is a limitation in how X handles keyboard grabbing. Essentially, when GTK opens a menu, it needs to grab keyboard and mouse. When that happens, gnome-screensaver cannot exclusively grab the keyboard.

There are two ways to fix this: 1- Redesign how X handles keyboard grabbing, and probably break compatibility with every single X application. 2- Put a hack into GTK to make menus close themselves after an inactivity timeout.

Of course, just fixing the issue in GTK will not fix the issue in other applications that grab the keyboard, such as rdesktop or vnc.

We have plans to move screen locking into LightDM. Once that is done, the screen will lock with a VT switch, which will work around this issue. Also, hopefully Wayland will have a better solution for keyboard grabs.

This isn't a simple fix, the whole system needs to be redesigned to solve this problem. This is why it's not fixed yet.