From c7058143c76aede87ba6d51efff4cc9990719d7d Mon Sep 17 00:00:00 2001 From: Brice <59537185+rhodes-b@users.noreply.github.com> Date: Sat, 11 Oct 2025 14:52:35 -0500 Subject: [PATCH] GTK fix quick terminal autohide (#9139) This is pretty much a direct port of the previous GTK app. still inside of the `isActive` handler for a window https://github.com/ghostty-org/ghostty/blob/7e429d73d6af65a397c6264b18ab60609ae8eefe/src/apprt/gtk/Window.zig#L822-L837 Fixes: https://github.com/ghostty-org/ghostty/discussions/9137 --- src/apprt/gtk/class/window.zig | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/apprt/gtk/class/window.zig b/src/apprt/gtk/class/window.zig index 746bcd379..4febebfc6 100644 --- a/src/apprt/gtk/class/window.zig +++ b/src/apprt/gtk/class/window.zig @@ -1015,6 +1015,15 @@ pub const Window = extern struct { _: *gobject.ParamSpec, self: *Self, ) callconv(.c) void { + // Hide quick-terminal if set to autohide + if (self.isQuickTerminal()) { + if (self.getConfig()) |cfg| { + if (cfg.get().@"quick-terminal-autohide" and self.as(gtk.Window).isActive() == 0) { + self.toggleVisibility(); + } + } + } + // Don't change urgency if we're not the active window. if (self.as(gtk.Window).isActive() == 0) return;