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


7e429d73d6/src/apprt/gtk/Window.zig (L822-L837)

Fixes: https://github.com/ghostty-org/ghostty/discussions/9137
1.2.x
Brice 2025-10-11 14:52:35 -05:00 committed by Mitchell Hashimoto
parent 6a2eb6757b
commit 5ecb00fd48
No known key found for this signature in database
GPG Key ID: 523D5DC389D273BC
1 changed files with 9 additions and 0 deletions

View File

@ -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;