From 67119e64338ef2f8d7cff18e9653ba6dea712d48 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 20 Nov 2023 14:16:13 -0800 Subject: [PATCH] apprt/gtk: disable GTK capturing F10 Fixes #894 --- src/apprt/gtk/Window.zig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/apprt/gtk/Window.zig b/src/apprt/gtk/Window.zig index 3fd1bfcc3..cd8343c7c 100644 --- a/src/apprt/gtk/Window.zig +++ b/src/apprt/gtk/Window.zig @@ -62,6 +62,10 @@ pub fn init(self: *Window, app: *App) !void { c.gtk_window_set_title(gtk_window, "Ghostty"); 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 // to the search path and see if we can find it there. self.icon = try icon.appIcon(self.app, window);