We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2665

Summary: Linux: SDL_KeyboardEvent always yields 0 for windowID
Product: SDL Reporter: Coranna Howard <me>
Component: eventsAssignee: Sam Lantinga <slouken>
Status: RESOLVED INVALID QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: me
Version: 2.0.3   
Hardware: x86_64   
OS: Linux   
Attachments: C++ testcase

Description Coranna Howard 2014-07-29 21:47:58 UTC
Created attachment 1793 [details]
C++ testcase

I suspect this has something to do with focus handling in the X11 backend. I haven't grasped the whole "pending focus" situation, so I've not attempted to hack up a patch. Mouse events have the correct windowID, but they're registered *with* the window the system events were sent to in the first place.
Comment 1 Coranna Howard 2014-07-29 21:59:31 UTC
Oh, and I should probably mention that windows never have ID 0, from what I've seen (IDs start at 2 for some reason). Side annoyance: ID!? I'd much rather have the window pointer from events. Indirection is no fun.
Comment 2 Coranna Howard 2014-07-30 04:52:40 UTC
Well, apparently my CMake configuration had disabled the timer sub-system, which in turn caused the pending focus to never trigger. Go figure.