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
pull/9151/head
Brice 2025-10-11 14:52:35 -05:00 committed by GitHub
parent 81c982df96
commit c7058143c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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;