diff options
| author | Volker Rümelin <vr_qemu@t-online.de> | 2024-09-09 08:15:51 +0200 |
|---|---|---|
| committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-09-13 20:12:16 +0200 |
| commit | df3c610ffc0335940e95826c643477b46418dcd3 (patch) | |
| tree | 1ea7ef2dc2b9b940f4f0add267069d45e7f74444 /ui/sdl2.c | |
| parent | 6e7d8c5f3d52283e3621bf84ba59fd0b54e79fcb (diff) | |
| download | focaccia-qemu-df3c610ffc0335940e95826c643477b46418dcd3.tar.gz focaccia-qemu-df3c610ffc0335940e95826c643477b46418dcd3.zip | |
ui/sdl2: release all modifiers
Each virtual console in the SDL2 frontend has a key state map. When switching windows with GUI keys we have to release all pressed modifier keys in the currently active window, because after the switch the now inactive window no longer receives the key release events. To reproduce the issue open a text editor in the SDL UI and then press Ctrl-Alt-2 to open a Compat Monitor Console. Close the console with the mouse. Try to enter text in the text editor and notice that the modifier keys Ctrl and Alt are stuck and need to be pressed once to be released. Tested-by: Howard Spoelstra <hsp.cat7@gmail.com> Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Tested-by: Bernhard Beschow <shentey@gmail.com> Message-ID: <20240909061552.6122-2-vr_qemu@t-online.de> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'ui/sdl2.c')
| -rw-r--r-- | ui/sdl2.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ui/sdl2.c b/ui/sdl2.c index 251ce97796..71a0d471d1 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -418,6 +418,7 @@ static void handle_keydown(SDL_Event *ev) SDL_ShowWindow(sdl2_console[win].real_window); } } + sdl2_release_modifiers(scon); gui_keysym = 1; } break; |