Unity steals focus, even if input has been grabbed

Bug #964414 reported by covox
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
unity-2d
New
Undecided
Unassigned

Bug Description

There are several applications which use XGrabKeyboard to ensure the full range of keypresses can be used by an application. A good example is in DOSBox; quite a lot of games use the <Alt> key to jump, so you can turn on input-grabbing to prevent the window manager from acting on keypresses (e.g. <Alt>+<Right> to switch desktops).

Of course <Alt> is now intercepted by Unity's HUD feature, and this interception somehow overrides XGrabKeyboard.

Ways to reproduce:
- Open up DOSBox
- Press <Ctrl> + <F10> to grab the keyboard and mouse input
- Press <Alt>, Unity HUD will take over and DOSBox will lose focus

Revision history for this message
covox (covox) wrote :

I don't think that this bug is an exact duplicate of https://bugs.launchpad.net/bugs/806255, as that one is filed against Compiz. While it probably shares the same type of incompatibility between XkbStateNotify and XGrabKeyboard, the location of this one would be in Unity 2D.

Revision history for this message
Gatis Paeglis (gatis-paeglis) wrote :

This affects Qt applications as well. Reproducible with plain xcb code, see the code in the attachment.

Revision history for this message
Gatis Paeglis (gatis-paeglis) wrote :

test code

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.