[PULL 4/5] ui/sdl2: fix reset scaling binding to be consistent with gtk

marcandre.lureau@redhat.com posted 5 patches 1 month, 2 weeks ago
Maintainers: "Marc-André Lureau" <marcandre.lureau@redhat.com>
There is a newer version of this series
[PULL 4/5] ui/sdl2: fix reset scaling binding to be consistent with gtk
Posted by marcandre.lureau@redhat.com 1 month, 2 weeks ago
From: Nir Lichtman <nir@lichtman.org>

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>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20250910114929.GA1783677@lichtman.org>
---
 ui/sdl2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui/sdl2.c b/ui/sdl2.c
index b00e421f7f..032dc14bc3 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.51.0
Re: [PULL 4/5] ui/sdl2: fix reset scaling binding to be consistent with gtk
Posted by Michael Tokarev 1 month, 2 weeks ago
On 9/30/25 10:55, marcandre.lureau@redhat.com wrote:
> From: Nir Lichtman <nir@lichtman.org>
> 
> 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>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> Message-ID: <20250910114929.GA1783677@lichtman.org>
> ---
>   ui/sdl2.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/ui/sdl2.c b/ui/sdl2.c
> index b00e421f7f..032dc14bc3 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:

Can't we keep the old behavior too, for a release or two maybe?

Thanks,

/mjt
Re: [PULL 4/5] ui/sdl2: fix reset scaling binding to be consistent with gtk
Posted by Thomas Huth 1 month, 1 week ago
On 01/10/2025 22.11, Michael Tokarev wrote:
> On 9/30/25 10:55, marcandre.lureau@redhat.com wrote:
>> From: Nir Lichtman <nir@lichtman.org>
>>
>> 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>
>> Reviewed-by: Thomas Huth <thuth@redhat.com>
>> Message-ID: <20250910114929.GA1783677@lichtman.org>
>> ---
>>   ui/sdl2.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/ui/sdl2.c b/ui/sdl2.c
>> index b00e421f7f..032dc14bc3 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:
> 
> Can't we keep the old behavior too, for a release or two maybe?

It's already merge, so please send a new patch for this.

  Thomas