summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrice <59537185+rhodes-b@users.noreply.github.com>2025-10-11 14:52:35 -0500
committerGitHub <noreply@github.com>2025-10-11 12:52:35 -0700
commitc7058143c76aede87ba6d51efff4cc9990719d7d (patch)
tree4f8303c4b7db48d9899ff169ec87535476946b19
parent81c982df96985c398fca41acc28a386bcb121679 (diff)
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
-rw-r--r--src/apprt/gtk/class/window.zig9
1 files changed, 9 insertions, 0 deletions
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;