Bug 69298 - Keyboard stealing is too aggresive
Summary: Keyboard stealing is too aggresive
Status: RESOLVED MOVED
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/Xlib (show other bugs)
Version: 7.7 (2012.06)
Hardware: All Linux (All)
: medium enhancement
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-13 00:19 UTC by sworddragon2
Modified: 2018-08-10 20:10 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description sworddragon2 2013-09-13 00:19:58 UTC
This is a more complex problem and I have initially posted it on the Openbox tracker: https://bugzilla.icculus.org/show_bug.cgi?id=6017

Some applications (commonly native linux games) are grabbing the keyboard (I'm assuming they are calling XGrabKeyboard()). They keybinds from any window manager won't work in this case anymore. But this also prevents important features such as minimizing the application or making screenshots.

But as you can see on the linked ticket I'm not sure if this problem should be solved by all windows manager or xorg. If all windows manager would call XGrabKeyboard() at the beginning no application could make any keybindings anymore. Currently this would break some applications like many native linux games and GTK+ menus.

If this is a problem that should be solved by xorg I'm seeing 2 potential ways to solve this:

1. XGrabKey() could prevent any further grabbing to the mapped keys. A call of XGrabKeyboard() will then grab all keys except already grabbed ones.

2. XGrabKey() and XGrabKeyboard() could create a stack and report events to every application that has made a grab.
Comment 1 sworddragon2 2018-01-21 13:47:44 UTC
I have thought about it and in some cases it might be actually important that applications can uniquely grab the keyboard. For example if a screenlocker couldn't and in the background a chat window would still be open as soon as the user enters his password on the locking window this might be a security problem.

I'm not sure how to solve this at all but eventually aggressive abilities like uniquely grabbing the keyboard should be bind to higher permissions so that it can be configured which applications are allowed to do this.
Comment 2 GitLab Migration User 2018-08-10 20:10:37 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/lib/libx11/issues/32.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.