gtk: don't allow focusing on tab overview or menu buttons (#7826)

This prevents GTK from focusing on those buttons, which would prevent
focus from returning to the terminal after those buttons had been used.
This commit is contained in:
Mitchell Hashimoto
2025-07-06 06:39:56 -07:00
committed by GitHub

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);
}