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] Key repeats forever after focus loss on Wayland #4018

Closed
SDLBugzilla opened this issue Feb 11, 2021 · 0 comments
Closed

[PATCH] Key repeats forever after focus loss on Wayland #4018

SDLBugzilla opened this issue Feb 11, 2021 · 0 comments

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.0
Reported for operating system, platform: Linux, x86_64

Comments on the original bug report:

On 2021-01-24 23:24:49 +0000, Cameron Gutman wrote:

SDL_SetKeyboardFocus(NULL) will lift any keys still pressed when keyboard focus
leaves the window, but then key repeat comes behind our backs and presses the
key down again. This results in an infinite stream of SDL_KEYDOWN events when
focus leaves the window with a key down (particularly noticeable with Alt+Tab).

The fix is simply to call keyboard_repeat_clear() in keyboard_handle_leave().

On 2021-01-24 23:25:17 +0000, Cameron Gutman wrote:

Created attachment 4702
Patch

On 2021-01-26 02:58:00 +0000, Sam Lantinga wrote:

Patch added, thanks!
https://hg.libsdl.org/SDL/rev/e9b56cbc004d

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

1 participant