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 2745 - [Patch] SDL_CreateWindow: Don't mask out INPUT_FOCUS flag, X11 backend checks for it
Summary: [Patch] SDL_CreateWindow: Don't mask out INPUT_FOCUS flag, X11 backend checks...
Status: WAITING
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.1
Hardware: All Linux
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords: target-2.0.6
Depends on:
Blocks:
 
Reported: 2014-10-05 11:00 UTC by Jonas Kulla
Modified: 2017-08-09 23:25 UTC (History)
1 user (show)

See Also:


Attachments
patch (510 bytes, patch)
2014-10-05 11:00 UTC, Jonas Kulla
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonas Kulla 2014-10-05 11:00:55 UTC
Created attachment 1889 [details]
patch

X11 backend of window creation code (SDL_x11window.c:297) decides based on this flag whether to call SDL_SetKeyboardFocus, and I need this to be called because I use multiple windows and can't differentiate key events based on the windowID otherwise.
Comment 1 Jonas Kulla 2014-11-03 18:17:39 UTC
bump.
Comment 2 Ryan C. Gordon 2017-08-09 05:32:20 UTC
(Sorry if you get a lot of copies of this email, we're touching dozens of bug reports right now.)

Tagging a bunch of bugs as target-2.0.6.

This means we're in the final stretch for an official SDL 2.0.6 release! These are the bugs we really want to fix before shipping if humanly possible.

That being said, we don't promise to fix them because of this tag, we just want to make sure we don't forget to deal with them before we bless a final 2.0.6 release, and generally be organized about what we're aiming to ship. After some debate, we might just remove this tag again and deal with it for a later release.

Hopefully you'll hear more about this bug soon. If you have more information (including "this got fixed at some point, nevermind"), we would love to have you come add more information to the bug report when you have a moment.

Thanks!
--ryan.
Comment 3 Sam Lantinga 2017-08-09 23:25:58 UTC
What the X11 code is actually doing is checking to see if the window really has focus, and calling SDL_SetKeyboardFocus() if that's the case.

What should be happening is the fact that you're mapping the windows should cause the window manager to give focus to one of your windows and SDL should catch that event and assign that window focus internally.

Since that doesn't appear to be happening, that seems to be a bug in the window manager event detection for new windows. Can you please post a minimal example that reproduces this problem so we can investigate more thoroughly?

Thanks!