Bug 590919 - Grabs all keys irrespective of uses
Summary: Grabs all keys irrespective of uses
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: SDL
Version: 13
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Thomas Woerner
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-10 23:58 UTC by Bastien Nocera
Modified: 2011-06-27 16:15 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-06-27 16:15:32 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Bastien Nocera 2010-05-10 23:58:58 UTC
Applications using SDL will automatically grab the whole of the keyboard using XGrabKeyboard, even if some of the keys are of absolutely no use to it.

The code under src/video/x11 should allow for some of the key events to be passed to the desktop/root window.

Keys that would have been helpful in my case were brightness keys and volume keys.

Comment 1 Bastien Nocera 2010-05-11 00:00:20 UTC
Peter, any ideas how to achieve that?

The XGrabKeyboard is pretty hard-coded in SDL:
363 ↦       ↦       /* Now grab the keyboard */•
364 ↦       ↦       XGrabKeyboard(SDL_Display, WMwindow, True,•
365 ↦       ↦       ↦       ↦       GrabModeAsync, GrabModeAsync, CurrentTime);•

Comment 2 Thomas Woerner 2010-05-11 09:02:33 UTC
Bastien, SDL does not know which keys are used by the application, therefore if may and should not ignore keys.

Usually games have their own volume control. Media applications are handling media keys on their own and also brightness and volume. Think of xbmc for example. These are very good reasons not to break the current keyboard event behaviour.

Comment 3 Petr Pisar 2010-05-11 09:07:20 UTC
I do investigation in this matter few years ago and I found it's a feature.
Imagine how wild gamblers felt, if they pressed wrong key and desktop
environment interrupted their game :) In addition a lot of games utilize keys
that clash with desktop shortcuts.

I think the grab could be optional (driven by an environment variable like
sound back-end selection). However I can not see any way how to differentiate
keys to pass to SDL and keys to pass to other X clients without SDL application
cooperation.

I propose to keyword this report as Feature request and pass it to upstream.

Comment 4 Peter Hutterer 2010-05-13 06:26:20 UTC
(In reply to comment #1)
> Peter, any ideas how to achieve that?

not without grab priorities, which are an idea to have for XI2.1 but far from execution. sorry.

you could sort-of get around it by passively grabbing the keys on the devices directly instead of on the master devices (core devices), but that only works now because no-one else does so. It'd be an arms race and sooner or later the same situation would present itself again.

Comment 5 Bug Zapper 2011-06-02 14:13:30 UTC
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '13'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 13 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 6 Bug Zapper 2011-06-27 16:15:32 UTC
Fedora 13 changed to end-of-life (EOL) status on 2011-06-25. Fedora 13 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.