Bug 296483

Summary: X Keyboard events are "swallowed" by KDE applications and cannot be observed by other applications
Product: [I don't know] kde Reporter: Jochen Keil <j.keil>
Component: generalAssignee: active
Status: RESOLVED NOT A BUG    
Severity: normal CC: cfeck
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Jochen Keil 2012-03-21 07:17:30 UTC
Using "xev -id" on an KDE application like digikam (where I noticed this first) shows that KeyPress and KeyRelease Events cannot be seen by other applications.

Other applications, wether gtk based or without toolkit report all events.
Since I'm using/modifying/writing an application (custom window manager) which does a SelectInput on a newly created windows, I expect to see the selected events.

From my understanding the KDE event loop "swallows" the KeyPress/Release events by not putting them back into the event queue.
Comment 1 Jochen Keil 2012-03-21 09:21:12 UTC
Sorry for assigning this to "Active".
I did not understand that this means the "Active Project". I rather thought it meant something like "active bug" or so.
I've put this to kde general now, since I could not find a better category.
Comment 2 Christoph Feck 2012-05-19 02:42:46 UTC
> KeyPress and KeyRelease Events cannot be seen by other applications

Can you be more specific why this is a bug? As far as I understand X11, only the window that has the keyboard focus should receive keyboard events. Additionally, applications can ask X11  to get keyboard events even when the window is not focused ("keyboard grabbing"). This is, for example, done in kglobalaccel to support global keyboard shortcuts.
Comment 3 Jochen Keil 2012-05-19 07:22:36 UTC
Hello,

sorry for leaving this open. It turned out that I had to walk the X window tree (recursive call to xquerytree) and set my eventmask on every subwindow of e.g. digikam. Didn't know about subwindows previously so this caused some confusion and led me to the assumption that kde apps "swallow" key events.
Gladly this is not a problem though.