From 233ad84224015a8bd5ab626609a370fe3b5f6ab3 Mon Sep 17 00:00:00 2001 From: Nikita Bobko Date: Fri, 27 Dec 2024 21:19:10 +0100 Subject: [PATCH] Ghostty: don't treat "Ghostty Quick Terminal" as a real window --- Sources/AppBundle/tree/MacWindow.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Sources/AppBundle/tree/MacWindow.swift b/Sources/AppBundle/tree/MacWindow.swift index 5af60f50..bbed5825 100644 --- a/Sources/AppBundle/tree/MacWindow.swift +++ b/Sources/AppBundle/tree/MacWindow.swift @@ -209,6 +209,14 @@ final class MacWindow: Window, CustomStringConvertible { func isWindow(_ axWindow: AXUIElement, _ app: MacApp) -> Bool { let subrole = axWindow.get(Ax.subroleAttr) + // Just don't do anything with "Ghostty Quick Terminal" windows. + // Its position and size are managed by the Ghostty itself + // https://github.com/nikitabobko/AeroSpace/issues/103 + // https://github.com/ghostty-org/ghostty/discussions/3512 + if app.id == "com.mitchellh.ghostty" && axWindow.get(Ax.identifierAttr) == "com.mitchellh.ghostty.quickTerminal" { + return false + } + // Try to filter out incredibly weird popup like AXWindows without any buttons. // E.g. // - Sonoma (macOS 14) keyboard layout switch