Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ghostty tabs are multiple (invisible) windows #778

Closed
Pitasi opened this issue Nov 29, 2024 · 5 comments
Closed

Ghostty tabs are multiple (invisible) windows #778

Pitasi opened this issue Nov 29, 2024 · 5 comments
Labels
bug Something isn't working as expected duplicate The issue is a duplicate

Comments

@Pitasi
Copy link

Pitasi commented Nov 29, 2024

Describe the bug
First of all: I love Aerospace, you made me like Mac OS again!

I just started trying ghostty, I'm not very familiar with Mac OS windows nor how Aerospace works internally. What I see is that if I use multiple ghostty tabs, they look like invisible windows. I.e. if I have 3 tabs, Aerospace splits my screen like I have 3 windows but only one of them is visible. If I use ghostty shortcuts to switch between them, the visible becomes invisible, and the next one becomes visible.

I have a screen recording:

broken.ext.display.mp4
aerospace debug-windows (switching between the two tabs)
com.mitchellh.ghostty.window.2237 windowId: 2237
com.mitchellh.ghostty.window.2237 workspace: 2
com.mitchellh.ghostty.window.2237 treeNodeParent: AppBundle.TilingContainer
com.mitchellh.ghostty.window.2237 recognizedAsDialog: false
com.mitchellh.ghostty.window.2237 AXTitle: Optional(antonio: aerospace debug-windows  - aerospace)
com.mitchellh.ghostty.window.2237 AXRole: Optional(AXWindow)
com.mitchellh.ghostty.window.2237 AXSubrole: Optional(AXStandardWindow)
com.mitchellh.ghostty.window.2237 AXIdentifier: Optional(TerminalWindowRestoration)
com.mitchellh.ghostty.window.2237 AXFocused: Optional(0)
com.mitchellh.ghostty.window.2237 AXFullScreen: Optional(0)
com.mitchellh.ghostty.window.2237 AXFrame: Optional( {value = x:1284.000000 y:33.000000 w:1268.000000 h:1398.000000 type = kAXValueCGRectType})
com.mitchellh.ghostty.window.2237 AXPosition: Optional( {value = x:1284.000000 y:33.000000 type = kAXValueCGPointType})
com.mitchellh.ghostty.window.2237 AXGrowArea: nil
com.mitchellh.ghostty.window.2237 AXMinimizeButton: AXUIElement {
com.mitchellh.ghostty.window.2237      AXRole: Optional(AXButton)
com.mitchellh.ghostty.window.2237      AXTitle: nil
com.mitchellh.ghostty.window.2237      AXSubrole: Optional(AXMinimizeButton)
com.mitchellh.ghostty.window.2237      AXEnabled: Optional(1)
com.mitchellh.ghostty.window.2237      AXParent: AXUIElement(windowId=2237, title="antonio: aerospace debug-windows  - aerospace", role="AXWindow", subrole="AXStandardWindow")
com.mitchellh.ghostty.window.2237      AXTopLevelUIElement: AXUIElement(windowId=2237, title="antonio: aerospace debug-windows  - aerospace", role="AXWindow", subrole="AXStandardWindow")
com.mitchellh.ghostty.window.2237      AXWindow: AXUIElement(windowId=2237, title="antonio: aerospace debug-windows  - aerospace", role="AXWindow", subrole="AXStandardWindow")
com.mitchellh.ghostty.window.2237      Ignored: AXFrame, AXSize, AXFocused, AXHelp, AXPosition, AXRoleDescription
com.mitchellh.ghostty.window.2237 }
com.mitchellh.ghostty.window.2237 AXDocument: Optional(file:///Users/antonio/)
com.mitchellh.ghostty.window.2237 AXSections: [
com.mitchellh.ghostty.window.2237         Optional({
com.mitchellh.ghostty.window.2237             SectionDescription = Content;
com.mitchellh.ghostty.window.2237             SectionObject = " {pid=4555}";
com.mitchellh.ghostty.window.2237             SectionUniqueID = AXContent;
com.mitchellh.ghostty.window.2237         }),
com.mitchellh.ghostty.window.2237         Optional({
com.mitchellh.ghostty.window.2237             SectionObject = " {pid=4555}";
com.mitchellh.ghostty.window.2237             SectionUniqueID = AXContainer;
com.mitchellh.ghostty.window.2237         })
com.mitchellh.ghostty.window.2237 ]
com.mitchellh.ghostty.window.2237 AXCloseButton: AXUIElement {
com.mitchellh.ghostty.window.2237      AXRole: Optional(AXButton)
com.mitchellh.ghostty.window.2237      AXTitle: nil
com.mitchellh.ghostty.window.2237      AXSubrole: Optional(AXCloseButton)
com.mitchellh.ghostty.window.2237      AXEnabled: Optional(1)
com.mitchellh.ghostty.window.2237      AXParent: AXUIElement(windowId=2237, title="antonio: aerospace debug-windows  - aerospace", role="AXWindow", subrole="AXStandardWindow")
com.mitchellh.ghostty.window.2237      AXTopLevelUIElement: AXUIElement(windowId=2237, title="antonio: aerospace debug-windows  - aerospace", role="AXWindow", subrole="AXStandardWindow")
com.mitchellh.ghostty.window.2237      AXWindow: AXUIElement(windowId=2237, title="antonio: aerospace debug-windows  - aerospace", role="AXWindow", subrole="AXStandardWindow")
com.mitchellh.ghostty.window.2237      Ignored: AXFrame, AXSize, AXFocused, AXHelp, AXPosition, AXRoleDescription, AXEdited
com.mitchellh.ghostty.window.2237 }
com.mitchellh.ghostty.window.2237 AXMain: Optional(1)
com.mitchellh.ghostty.window.2237 AXActivationPoint: Optional( {value = x:1354.000000 y:47.000000 type = kAXValueCGPointType})
com.mitchellh.ghostty.window.2237 AXFullScreenButton: AXUIElement {
com.mitchellh.ghostty.window.2237      AXRole: Optional(AXButton)
com.mitchellh.ghostty.window.2237      AXTitle: nil
com.mitchellh.ghostty.window.2237      AXSubrole: Optional(AXFullScreenButton)
com.mitchellh.ghostty.window.2237      AXEnabled: Optional(1)
com.mitchellh.ghostty.window.2237      AXParent: AXUIElement(windowId=2237, title="antonio: aerospace debug-windows  - aerospace", role="AXWindow", subrole="AXStandardWindow")
com.mitchellh.ghostty.window.2237      AXTopLevelUIElement: AXUIElement(windowId=2237, title="antonio: aerospace debug-windows  - aerospace", role="AXWindow", subrole="AXStandardWindow")
com.mitchellh.ghostty.window.2237      AXWindow: AXUIElement(windowId=2237, title="antonio: aerospace debug-windows  - aerospace", role="AXWindow", subrole="AXStandardWindow")
com.mitchellh.ghostty.window.2237      Ignored: AXFrame, AXSize, AXFocused, AXChildren, AXHelp, AXPosition, AXRoleDescription
com.mitchellh.ghostty.window.2237 }
com.mitchellh.ghostty.window.2237 AXProxy: AXUIElement(windowId=2237, title="antonio", role="AXImage", subrole=nil)
com.mitchellh.ghostty.window.2237 AXDefaultButton: nil
com.mitchellh.ghostty.window.2237 AXMinimized: Optional(0)
com.mitchellh.ghostty.window.2237 AXParent: Optional( {pid=4555})
com.mitchellh.ghostty.window.2237 AXTitleUIElement: AXUIElement(windowId=2237, title=nil, role="AXStaticText", subrole=nil)
com.mitchellh.ghostty.window.2237 AXCancelButton: nil
com.mitchellh.ghostty.window.2237 AXModal: Optional(0)
com.mitchellh.ghostty.window.2237 AXZoomButton: AXUIElement {
com.mitchellh.ghostty.window.2237      AXRole: Optional(AXButton)
com.mitchellh.ghostty.window.2237      AXTitle: nil
com.mitchellh.ghostty.window.2237      AXSubrole: Optional(AXFullScreenButton)
com.mitchellh.ghostty.window.2237      AXEnabled: Optional(1)
com.mitchellh.ghostty.window.2237      AXParent: AXUIElement(windowId=2237, title="antonio: aerospace debug-windows  - aerospace", role="AXWindow", subrole="AXStandardWindow")
com.mitchellh.ghostty.window.2237      AXTopLevelUIElement: AXUIElement(windowId=2237, title="antonio: aerospace debug-windows  - aerospace", role="AXWindow", subrole="AXStandardWindow")
com.mitchellh.ghostty.window.2237      AXWindow: AXUIElement(windowId=2237, title="antonio: aerospace debug-windows  - aerospace", role="AXWindow", subrole="AXStandardWindow")
com.mitchellh.ghostty.window.2237      Ignored: AXFrame, AXSize, AXFocused, AXChildren, AXHelp, AXPosition, AXRoleDescription
com.mitchellh.ghostty.window.2237 }
com.mitchellh.ghostty.window.2237 AXSize: Optional( {value = w:1268.000000 h:1398.000000 type = kAXValueCGSizeType})
com.mitchellh.ghostty.window.2237 AXToolbarButton: nil
com.mitchellh.ghostty.window.2237 Ignored: AXChildrenInNavigationOrder, AXChildren, AXRoleDescription
com.mitchellh.ghostty             AXRole: Optional(AXApplication)
com.mitchellh.ghostty             AXTitle: Optional(Ghostty)
com.mitchellh.ghostty             AXFunctionRowTopLevelElements: [
com.mitchellh.ghostty             ]
com.mitchellh.ghostty             AXFrame: nil
com.mitchellh.ghostty             AXFocusedUIElement: AXUIElement(windowId=2237, title=nil, role="AXUnknown", subrole=nil)
com.mitchellh.ghostty             AXFrontmost: Optional(1)
com.mitchellh.ghostty             AXExtrasMenuBar: nil
com.mitchellh.ghostty             AXMainWindow: AXUIElement(windowId=2237, title="antonio: aerospace debug-windows  - aerospace", role="AXWindow", subrole="AXStandardWindow")
com.mitchellh.ghostty             AXFocusedWindow: AXUIElement(windowId=2237, title="antonio: aerospace debug-windows  - aerospace", role="AXWindow", subrole="AXStandardWindow")
com.mitchellh.ghostty             AXMenuBar: Optional( {pid=4555})
com.mitchellh.ghostty             AXWindows: [
com.mitchellh.ghostty                 AXUIElement(windowId=2237, title="antonio: aerospace debug-windows  - aerospace", role="AXWindow", subrole="AXStandardWindow")
com.mitchellh.ghostty             ]
com.mitchellh.ghostty             AXSize: nil
com.mitchellh.ghostty             AXPosition: nil
com.mitchellh.ghostty             Ignored: AXChildren, AXChildrenInNavigationOrder, AXEnhancedUserInterface, AXPreferredLanguage, AXRoleDescription, AXHidden

com.mitchellh.ghostty.window.1622 windowId: 1622
com.mitchellh.ghostty.window.1622 workspace: 2
com.mitchellh.ghostty.window.1622 treeNodeParent: AppBundle.TilingContainer
com.mitchellh.ghostty.window.1622 recognizedAsDialog: false
com.mitchellh.ghostty.window.1622 AXTitle: Optional(~ - fish)
com.mitchellh.ghostty.window.1622 AXRole: Optional(AXWindow)
com.mitchellh.ghostty.window.1622 AXSubrole: Optional(AXStandardWindow)
com.mitchellh.ghostty.window.1622 AXIdentifier: Optional(TerminalWindowRestoration)
com.mitchellh.ghostty.window.1622 AXFocused: Optional(0)
com.mitchellh.ghostty.window.1622 AXFullScreen: Optional(0)
com.mitchellh.ghostty.window.1622 AXFrame: Optional(<AXValue 0x6000011cf580> {value = x:1284.000000 y:33.000000 w:1268.000000 h:1398.000000 type = kAXValueCGRectType})
com.mitchellh.ghostty.window.1622 AXPosition: Optional(<AXValue 0x600000a7a910> {value = x:1284.000000 y:33.000000 type = kAXValueCGPointType})
com.mitchellh.ghostty.window.1622 AXGrowArea: nil
com.mitchellh.ghostty.window.1622 AXMinimizeButton: AXUIElement {
com.mitchellh.ghostty.window.1622 AXRole: Optional(AXButton)
com.mitchellh.ghostty.window.1622 AXTitle: nil
com.mitchellh.ghostty.window.1622 AXSubrole: Optional(AXMinimizeButton)
com.mitchellh.ghostty.window.1622 AXEnabled: Optional(1)
com.mitchellh.ghostty.window.1622 AXParent: AXUIElement(windowId=1622, title="~ - fish", role="AXWindow", subrole="AXStandardWindow")
com.mitchellh.ghostty.window.1622 AXTopLevelUIElement: AXUIElement(windowId=1622, title="~ - fish", role="AXWindow", subrole="AXStandardWindow")
com.mitchellh.ghostty.window.1622 AXWindow: AXUIElement(windowId=1622, title="~ - fish", role="AXWindow", subrole="AXStandardWindow")
com.mitchellh.ghostty.window.1622 Ignored: AXFrame, AXSize, AXFocused, AXHelp, AXPosition, AXRoleDescription
com.mitchellh.ghostty.window.1622 }
com.mitchellh.ghostty.window.1622 AXDocument: Optional(file:///Users/antonio/)
com.mitchellh.ghostty.window.1622 AXSections: [
com.mitchellh.ghostty.window.1622 Optional({
com.mitchellh.ghostty.window.1622 SectionDescription = Content;
com.mitchellh.ghostty.window.1622 SectionObject = "<AXUIElement 0x600000a7a2e0> {pid=4555}";
com.mitchellh.ghostty.window.1622 SectionUniqueID = AXContent;
com.mitchellh.ghostty.window.1622 }),
com.mitchellh.ghostty.window.1622 Optional({
com.mitchellh.ghostty.window.1622 SectionObject = "<AXUIElement 0x600000a799e0> {pid=4555}";
com.mitchellh.ghostty.window.1622 SectionUniqueID = AXContainer;
com.mitchellh.ghostty.window.1622 })
com.mitchellh.ghostty.window.1622 ]
com.mitchellh.ghostty.window.1622 AXCloseButton: AXUIElement {
com.mitchellh.ghostty.window.1622 AXRole: Optional(AXButton)
com.mitchellh.ghostty.window.1622 AXTitle: nil
com.mitchellh.ghostty.window.1622 AXSubrole: Optional(AXCloseButton)
com.mitchellh.ghostty.window.1622 AXEnabled: Optional(1)
com.mitchellh.ghostty.window.1622 AXParent: AXUIElement(windowId=1622, title="~ - fish", role="AXWindow", subrole="AXStandardWindow")
com.mitchellh.ghostty.window.1622 AXTopLevelUIElement: AXUIElement(windowId=1622, title="~ - fish", role="AXWindow", subrole="AXStandardWindow")
com.mitchellh.ghostty.window.1622 AXWindow: AXUIElement(windowId=1622, title="~ - fish", role="AXWindow", subrole="AXStandardWindow")
com.mitchellh.ghostty.window.1622 Ignored: AXFrame, AXSize, AXFocused, AXHelp, AXPosition, AXRoleDescription, AXEdited
com.mitchellh.ghostty.window.1622 }
com.mitchellh.ghostty.window.1622 AXMain: Optional(1)
com.mitchellh.ghostty.window.1622 AXActivationPoint: Optional(<AXValue 0x600000aa9da0> {value = x:1354.000000 y:47.000000 type = kAXValueCGPointType})
com.mitchellh.ghostty.window.1622 AXFullScreenButton: AXUIElement {
com.mitchellh.ghostty.window.1622 AXRole: Optional(AXButton)
com.mitchellh.ghostty.window.1622 AXTitle: nil
com.mitchellh.ghostty.window.1622 AXSubrole: Optional(AXFullScreenButton)
com.mitchellh.ghostty.window.1622 AXEnabled: Optional(1)
com.mitchellh.ghostty.window.1622 AXParent: AXUIElement(windowId=1622, title="~ - fish", role="AXWindow", subrole="AXStandardWindow")
com.mitchellh.ghostty.window.1622 AXTopLevelUIElement: AXUIElement(windowId=1622, title="~ - fish", role="AXWindow", subrole="AXStandardWindow")
com.mitchellh.ghostty.window.1622 AXWindow: AXUIElement(windowId=1622, title="~ - fish", role="AXWindow", subrole="AXStandardWindow")
com.mitchellh.ghostty.window.1622 Ignored: AXFrame, AXSize, AXFocused, AXChildren, AXHelp, AXPosition, AXRoleDescription
com.mitchellh.ghostty.window.1622 }
com.mitchellh.ghostty.window.1622 AXProxy: AXUIElement(windowId=1622, title="antonio", role="AXImage", subrole=nil)
com.mitchellh.ghostty.window.1622 AXDefaultButton: nil
com.mitchellh.ghostty.window.1622 AXMinimized: Optional(0)
com.mitchellh.ghostty.window.1622 AXParent: Optional(<AXUIElement Application 0x600000aaa760> {pid=4555})
com.mitchellh.ghostty.window.1622 AXTitleUIElement: AXUIElement(windowId=1622, title=nil, role="AXStaticText", subrole=nil)
com.mitchellh.ghostty.window.1622 AXCancelButton: nil
com.mitchellh.ghostty.window.1622 AXModal: Optional(0)
com.mitchellh.ghostty.window.1622 AXZoomButton: AXUIElement {
com.mitchellh.ghostty.window.1622 AXRole: Optional(AXButton)
com.mitchellh.ghostty.window.1622 AXTitle: nil
com.mitchellh.ghostty.window.1622 AXSubrole: Optional(AXFullScreenButton)
com.mitchellh.ghostty.window.1622 AXEnabled: Optional(1)
com.mitchellh.ghostty.window.1622 AXParent: AXUIElement(windowId=1622, title="~ - fish", role="AXWindow", subrole="AXStandardWindow")
com.mitchellh.ghostty.window.1622 AXTopLevelUIElement: AXUIElement(windowId=1622, title="~ - fish", role="AXWindow", subrole="AXStandardWindow")
com.mitchellh.ghostty.window.1622 AXWindow: AXUIElement(windowId=1622, title="~ - fish", role="AXWindow", subrole="AXStandardWindow")
com.mitchellh.ghostty.window.1622 Ignored: AXFrame, AXSize, AXFocused, AXChildren, AXHelp, AXPosition, AXRoleDescription
com.mitchellh.ghostty.window.1622 }
com.mitchellh.ghostty.window.1622 AXSize: Optional(<AXValue 0x600000aaa760> {value = w:1268.000000 h:1398.000000 type = kAXValueCGSizeType})
com.mitchellh.ghostty.window.1622 AXToolbarButton: nil
com.mitchellh.ghostty.window.1622 Ignored: AXChildrenInNavigationOrder, AXChildren, AXRoleDescription
com.mitchellh.ghostty AXRole: Optional(AXApplication)
com.mitchellh.ghostty AXTitle: Optional(Ghostty)
com.mitchellh.ghostty AXFunctionRowTopLevelElements: [
com.mitchellh.ghostty ]
com.mitchellh.ghostty AXFrame: nil
com.mitchellh.ghostty AXFocusedUIElement: AXUIElement(windowId=1622, title=nil, role="AXUnknown", subrole=nil)
com.mitchellh.ghostty AXFrontmost: Optional(1)
com.mitchellh.ghostty AXExtrasMenuBar: nil
com.mitchellh.ghostty AXMainWindow: AXUIElement(windowId=1622, title="~ - fish", role="AXWindow", subrole="AXStandardWindow")
com.mitchellh.ghostty AXFocusedWindow: AXUIElement(windowId=1622, title="~ - fish", role="AXWindow", subrole="AXStandardWindow")
com.mitchellh.ghostty AXMenuBar: Optional(<AXUIElement 0x600000a7a250> {pid=4555})
com.mitchellh.ghostty AXWindows: [
com.mitchellh.ghostty AXUIElement(windowId=1622, title="~ - fish", role="AXWindow", subrole="AXStandardWindow")
com.mitchellh.ghostty ]
com.mitchellh.ghostty AXSize: nil
com.mitchellh.ghostty AXPosition: nil
com.mitchellh.ghostty Ignored: AXChildren, AXChildrenInNavigationOrder, AXEnhancedUserInterface, AXPreferredLanguage, AXRoleDescription, AXHidden

!!! DISCLAIMER !!!
!!! 'debug-windows' command is not stable API. Please don't rely on the command existence and output format !!!
!!! The only intended use case is to report bugs about incorrect windows handling !!!

Debug session finished

Related issues you could find

#445

@Pitasi Pitasi added the bug Something isn't working as expected label Nov 29, 2024
@Pitasi
Copy link
Author

Pitasi commented Nov 29, 2024

This has been fixed in 0.16.0-Beta! (see #445)

@Pitasi Pitasi closed this as completed Nov 29, 2024
@fredrikaverpil
Copy link

fredrikaverpil commented Nov 30, 2024

I don't think this is completely fixed. I've got this aerospace config:

[[on-window-detected]]
if.app-id = "com.mitchellh.ghostty"
run = ["move-node-to-workspace G"]

And each time I create a tab in Ghostty, it behaves like in your video above. I'm on AeroSpace v0.16.0-Beta d172dfd8a92f2d339f3d46a12a297e43e80768ca.

However, if I instead use this config, and manually unfloat the window (alt+shift+; followed by f), the problem is gone until I restart Ghostty:

[[on-window-detected]]
if.app-id = "com.mitchellh.ghostty"
run = [
+  "layout floating",
  "move-node-to-workspace G",
]

@Pitasi Pitasi reopened this Nov 30, 2024
@Pitasi
Copy link
Author

Pitasi commented Nov 30, 2024

I think you're right, I just tried another time and the issue returned. After I restart Aerospace it seems to be working for a while, I don't know exactly what triggers that behavior.

@fredrikaverpil
Copy link

fredrikaverpil commented Nov 30, 2024

Kind of looks like Ghostty must be started in floating (non-tiling) mode. Then you can unfloat (make it tile) and it will be ok, until restart of Ghostty.

@nikitabobko
Copy link
Owner

Duplicate of #68

@nikitabobko nikitabobko marked this as a duplicate of #68 Nov 30, 2024
@nikitabobko nikitabobko added the duplicate The issue is a duplicate label Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected duplicate The issue is a duplicate
Projects
None yet
Development

No branches or pull requests

3 participants