-
Notifications
You must be signed in to change notification settings - Fork 663
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
[GTK4] Disallow tab bar focussing #4885
base: main
Are you sure you want to change the base?
Conversation
8155ea0
to
9fc3d81
Compare
I can't say that I agree with the premise. Why can't you just use keybinds with |
Known problem if you're interested in fixing it in a separate PR. Would be good to have a fix before the next release. I tried reproducing the issue but never could. |
I think that I solved that along with my menu reorganization PR (#4952), but that'll have to wait until Mitchell finishes his GTK App/Window refactor because I need to touch some of the same code. |
I don't love the configuration on this. I think my question instead would be: is it desirable for the tab bar to EVER have keyboard focus? Is that a common thing? Tab navigation is already heavily bindable in Ghostty and I do agree with the premise that the tab bar getting focus from an extra click is not ideal. |
You know I checked what GNOME Text Editor does, and they seem to make the tab bar not focusable if you click on a tab. Though you can still tab through the widget tree to focus it if you try hard enough. I would say matching that behavior makes sense. Instead of call The feature request makes sense to me, and we should definitely get it in for 1.1! |
Fantastic. Thanks for doing the research. I agree. I think at least for 1.1, making the tab bar not focusable at all (as this PR does -- but without the config) seems fine. I think its far far far less desirable for that to ever gain focus than the incidental case you actually want it to via the keyboard or something. |
9fc3d81
to
b56dc87
Compare
Sorry for the delay, but I've taken out the configuration option and made it so that the "don't focus" functionality is the only behavior. PTAL and let me know if there's anything else you think could be improved. |
@tristan957 Fixed in #5410 |
@mitchellh I think this PR is ready for review, and pairs well with the recently merged PR to fix the Adwaita <1.4 tab bar issue as well. Hoping we can get this in for 1.1, whenever that is planned for. |
How come when I click tabs on my system the tab bar is not focused? Libadwaita version is 1.6.2. Is it possible that this was a bug in a previous version of libadw? |
Do you mean without this patch? I'm not certain, it's possible that the default behavior was changed. I'll see if I can reproduce. Either way, I think this PR makes sense for people on 22.04 and below. |
I have not tested this PR. Ghostty is just doing what you want automatically for me. Please do report back with your findings though. |
I'd like to see a decision on this PR so we don't have it lingering. I can't get my tab bar to focus on my machine, but maybe I'm doing something wrong. I also see very little down side to the one-line patch of explicitly making the tab bar non-focusable with GTK, so all things equal, I wouldn't mind just merging that even if it does nothing if @danudey claims it works for them. cc @ghostty-org/gtk |
It breaks the tab focus hierarchy if you do that. |
|
Then let's just close this? I haven't ever seen any other discussion complaining about this issue so while I'm appreciative of the PR, I'd be willing to just wait until there's something more apparent here. |
~Adds configuration to allow/~Disallow the Adwaita tab bar from gaining focus with an additional click. This is the default behaviour of the tab bar, and it allows users to use the arrow keys to navigate the tabs and then the tab key to move to the window surface.
Personally, I hate when this happens and don't ever want my tabs focussed by accident, so I thought it might make sense to add
a configuration optionfunctionality to prevent this from happening.Works great with adwaita 1.5 (Ubuntu 24.04) and adwaita 1.1 (Ubuntu 22.04). Tab bars in 22.04 are showing up above the window title bar, but
I'm not sure if that's related to this changethat seems to be unrelated to this changethat is resolved separately in #5410.