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

Check if SDL_GetKeyboardFocus is null in X11/Wayland events #10120

Merged
merged 1 commit into from
Jun 26, 2024

Conversation

hwsmm
Copy link
Contributor

@hwsmm hwsmm commented Jun 26, 2024

Description

SDL sets Invalid window error if SDL_PumpEvents is called while the keyboard is not focused.

This PR fixes it by checking if SDL_GetKeyboardFocus returns null before calling SDL_TextInputActive. I think there may be a better fix but it does the trick for me.

Existing Issue(s)

Probably none since this change got pushed only recently?

@slouken slouken merged commit dc8b06f into libsdl-org:main Jun 26, 2024
39 checks passed
@slouken
Copy link
Collaborator

slouken commented Jun 26, 2024

Merged, thanks!

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

Successfully merging this pull request may close these issues.

2 participants