geoffreybennett/alsa-scarlett-gui

File > Save Configuration, Name input gets initial focus but focus moves to a search input when typing

Opened this issue · 4 comments

When I want to type the name of the file, the focus moves to a search input which was not visible beforehand.

I'm suspicious that this has something to do with my system's [GTK] configuration, and may not be reproducible for anyone else... but I'd like to know if anyone else's GTK is doing this? As it may be relevant, I'm running i3 on Xorg on Arch.

I think I found the relevant GTK issue: https://gitlab.gnome.org/GNOME/gtk/-/issues/2638
related issue: https://gitlab.gnome.org/GNOME/gtk/-/issues/326

I see nothing suspicious in file.c, just a good old GTK_FILE_CHOOSER_ACTION_SAVE, I'm reading the GTK issue thread to try to understand how to change this, but figured I'd also ask here whether it's just me, and whether anyone knows a GTK config change to fix this annoyance.

edit: 2638 appears to be the relevant issue, not 326, oops
edit: this comment describes what I'm encountering more precisely. unclear if there's a known resolution. https://gitlab.gnome.org/GNOME/gtk/-/issues/2638#note_1359301

I saw this too when developing. At the time I was running it over ssh x11 forwarding and the problem went away when I tried running it locally in Wayland. Seems like a GTK4 bug to me. As a workaround you can do: alsactl -f file-to-save-as store USB (which is exactly what the GUI is currently doing).

Glad to know. After reading more, it seems like a GTK bug to me as well. There's a potential workaround here https://gitlab.gnome.org/GNOME/gtk/-/issues/2638#note_1208773

The bug disappeared for me once I gave the dialog a header bar, but comes back if I change the use_headerbar property to false.

I can try this out and see if it works as temporary workaround for the GTK bug. Will let you know.

edit: will not be letting you know haha, as use-header-bar property is only for GtkDialog and its children, not for GtkFileChooser. oh well.

What version of GTK4 are you using?
Edit: Nevermind, I see in another comment you wrote: 4.6.1

I'm using GTK4 4.4.2.
Using xfce, I can reproduce this issue. The save dialog looks like this:
save-jumping-focus
Using gnome desktop, there is no issue. The save dialog looks like this:
save-works