apprt/gtk: disable GTK capturing F10

Fixes #894
This commit is contained in:
Mitchell Hashimoto
2023-11-20 14:16:13 -08:00
parent 63625808c8
commit 67119e6433

View File

@ -62,6 +62,10 @@ pub fn init(self: *Window, app: *App) !void {
c.gtk_window_set_title(gtk_window, "Ghostty"); c.gtk_window_set_title(gtk_window, "Ghostty");
c.gtk_window_set_default_size(gtk_window, 1000, 600); c.gtk_window_set_default_size(gtk_window, 1000, 600);
// GTK4 grabs F10 input by default to focus the menubar icon. We want
// to disable this so that terminal programs can capture F10 (such as htop)
c.gtk_window_set_handle_menubar_accel(gtk_window, 0);
// If we don't have the icon then we'll try to add our resources dir // If we don't have the icon then we'll try to add our resources dir
// to the search path and see if we can find it there. // to the search path and see if we can find it there.
self.icon = try icon.appIcon(self.app, window); self.icon = try icon.appIcon(self.app, window);