Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Patch] SDL_CreateWindow: Don't mask out INPUT_FOCUS flag, X11 backend checks for it #1656

Closed
SDLBugzilla opened this issue Feb 10, 2021 · 2 comments
Assignees
Milestone

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: HG 2.1
Reported for operating system, platform: Linux, All

Comments on the original bug report:

On 2014-10-05 11:00:55 +0000, Jonas Kulla wrote:

Created attachment 1889
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.

On 2014-11-03 18:17:39 +0000, Jonas Kulla wrote:

bump.

On 2017-08-09 05:32:20 +0000, Ryan C. Gordon wrote:

(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.

On 2017-08-09 23:25:58 +0000, Sam Lantinga wrote:

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!

@SDLBugzilla SDLBugzilla added bug waiting Waiting on user response labels Feb 10, 2021
@icculus icculus added this to the 2.0.18 milestone Aug 11, 2021
@icculus
Copy link
Collaborator

icculus commented Aug 11, 2021

I'm assuming we either fixed this or it was a window manager thing, but I'll verify during 2.0.18.

@slouken slouken removed the waiting Waiting on user response label Nov 7, 2021
@icculus
Copy link
Collaborator

icculus commented Nov 15, 2021

This appears to be fixed (or to have been a window manager thing). The check in question probably never produces the INPUT_FOCUS flag during SDL_CreateWindow, since the window isn't mapped at the point of this check, but the usual stream of events eventually gets us there.

For SDL_CreateWindowFrom(), this check can pass and I assume it does.

@icculus icculus closed this as completed Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants