gtk: don't allow focusing on tab overview or menu buttons

This prevents GTK from focusing on those buttons, which would prevent
focus from returning to the terminal after those buttons had been used.
pull/7826/head
Jeffrey C. Ollie 2025-07-06 01:05:17 -05:00
parent dc18f1a2b9
commit b752ade112
No known key found for this signature in database
GPG Key ID: 6F86035A6D97044E
1 changed files with 2 additions and 0 deletions

View File

@ -214,6 +214,7 @@ pub fn init(self: *Window, app: *App) !void {
{
const btn = gtk.MenuButton.new();
btn.as(gtk.Widget).setTooltipText(i18n._("Main Menu"));
btn.as(gtk.Widget).setCanFocus(0);
btn.setIconName("open-menu-symbolic");
btn.setPopover(self.titlebar_menu.asWidget());
_ = gobject.Object.signals.notify.connect(
@ -253,6 +254,7 @@ pub fn init(self: *Window, app: *App) !void {
},
};
btn.setCanFocus(0);
btn.setFocusOnClick(0);
self.headerbar.packEnd(btn);
}