Tabs get focus
Hello!
Thanks for ddterm, I have been using since a while ago and I really enjoy it. Thanks a lot for this useful extension!
Small glitch/bug: clicking on the tabs with the mouse a second time focus the tab switch label, so what is typed does not go to the terminal. What is even weirder is that if you do it when a new tab is created then I can see the dashed line showing the focus, but if I hide then show again the terminal it behaves the same way but the dashed line is gone. I have played with the .ui files trying to disable the focus but it did not work, maybe it is hard coded somewhere?
Regards
These are two separate issues. Could you report them as such? i. e. "New issue" and move one of the two paragraphs there.
Done, search glitch moved to #89.
I'm not sure if it's a bug. GtkNotebook needs some form of keyboard navigation, after all. However, there are already keyboard shortcuts for the same purpose.
This is most likely implemented in GtkNotebook. I don't know whether it can be disabled.
Yes, GTK notebook is a little weird but I am sure this can be done. Both Gnome Terminal and Terminal use it for tabs and in both the tabs are not focuses and clicked, although you can still click (of couse) and double-click and secondary-click. Maybe setting the GTK property has_focus/can_focus in the code with prevent this?
Cracked it! Using the GTK inspector, I noticed the property can-focus changes from FALSE to TRUE when the tab bar gets displayed (this bug only happens when "Show tab bar" is set to "Automatic").
https://user-images.githubusercontent.com/65264536/223453717-3cd4fdef-6c37-443f-bf41-2decd1a883ec.mp4
We can solve this, by making sure we setting this property every time we insert a new page to the notebook:
insert_page(position) {
// ...
this.notebook.set_can_focus(false);
// ...
}
I'll submit a PR with that change.
Fix will be included in the next release