qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ui/sdl2: fix reset scaling binding to be consistent with gtk
@ 2025-09-10 11:49 Nir Lichtman
  2025-09-19  6:33 ` Thomas Huth
  0 siblings, 1 reply; 2+ messages in thread
From: Nir Lichtman @ 2025-09-10 11:49 UTC (permalink / raw)
  To: qemu-devel, kraxel; +Cc: peter.maydell, thuth, marcandre.lureau

Problem: Currently the reset scaling hotkey is inconsistent between SDL
and GTK graphics modes.

Solution: Fix SDL to use MOD+0 instead of MOD+u which is in line with
GTK and generally more consistent with other apps.

This is also related to my previously sent patch fixing the docs.

Suggested-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Nir Lichtman <nir@lichtman.org>
---
 ui/sdl2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui/sdl2.c b/ui/sdl2.c
index b00e421..032dc14 100644
--- a/ui/sdl2.c
+++ b/ui/sdl2.c
@@ -421,7 +421,7 @@ static void handle_keydown(SDL_Event *ev)
                 sdl_grab_end(scon);
             }
             break;
-        case SDL_SCANCODE_U:
+        case SDL_SCANCODE_0:
             sdl2_window_resize(scon);
             if (!scon->opengl) {
                 /* re-create scon->texture */
-- 
2.39.5



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ui/sdl2: fix reset scaling binding to be consistent with gtk
  2025-09-10 11:49 [PATCH] ui/sdl2: fix reset scaling binding to be consistent with gtk Nir Lichtman
@ 2025-09-19  6:33 ` Thomas Huth
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Huth @ 2025-09-19  6:33 UTC (permalink / raw)
  To: Nir Lichtman, qemu-devel, kraxel; +Cc: peter.maydell, marcandre.lureau

On 10/09/2025 13.49, Nir Lichtman wrote:
> Problem: Currently the reset scaling hotkey is inconsistent between SDL
> and GTK graphics modes.
> 
> Solution: Fix SDL to use MOD+0 instead of MOD+u which is in line with
> GTK and generally more consistent with other apps.
> 
> This is also related to my previously sent patch fixing the docs.
> 
> Suggested-by: Gerd Hoffmann <kraxel@redhat.com>
> Signed-off-by: Nir Lichtman <nir@lichtman.org>
> ---
>   ui/sdl2.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/ui/sdl2.c b/ui/sdl2.c
> index b00e421..032dc14 100644
> --- a/ui/sdl2.c
> +++ b/ui/sdl2.c
> @@ -421,7 +421,7 @@ static void handle_keydown(SDL_Event *ev)
>                   sdl_grab_end(scon);
>               }
>               break;
> -        case SDL_SCANCODE_U:
> +        case SDL_SCANCODE_0:
>               sdl2_window_resize(scon);
>               if (!scon->opengl) {
>                   /* re-create scon->texture */

Reviewed-by: Thomas Huth <thuth@redhat.com>



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-09-19  6:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-10 11:49 [PATCH] ui/sdl2: fix reset scaling binding to be consistent with gtk Nir Lichtman
2025-09-19  6:33 ` Thomas Huth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).