Skip to content

fix: Window menu tiling items are disabled - #413

Open
exequiellares wants to merge 1 commit into
mainfrom
fix/window-menu-tiling
Open

exequiellares wants to merge 1 commit into
mainfrom
fix/window-menu-tiling

Conversation

@exequiellares

Copy link
Copy Markdown

What this does

The Window menu's Fill, Center, Move & Resize, Full Screen Tile and Move to Display items (and their shortcuts) are greyed out in Programa. This makes them work again.

Summary

macOS enables those items only when the window reports isMovable == true. The main window was created with isMovable = false (from the cmux-era titlebar drag fix, and re-asserted in the chrome configure pass), which disables the whole tiling family. The flag was off to stop clicks under the transparent titlebar from turning into native window drags; that is now handled by MainWindowHostingView returning false from mouseDownCanMoveWindow, the same approach upstream Ghostty uses with its NonDraggableHostingView. isMovableByWindowBackground stays off, and the explicit performDrag paths are unchanged.

Test plan

  • Open the Window menu on a main window: Fill, Center, Move & Resize and Move to Display are enabled and act on the window.
  • ⌃⌥⌘F and the Move & Resize shortcuts tile the window.
  • Minimal sidebar mode: clicking sidebar buttons under the titlebar activates them and does not drag the window.
  • Dragging empty titlebar space still moves the window; dragging a sidebar tab reorders it without moving the window.
  • Dragging the titlebar folder icon still starts a file drag, not a window move.

AppKit validates Fill, Center, Move & Resize, Full Screen Tile and Move to
Display against NSWindow.isMovable. The main window set it to false to stop
clicks under the transparent titlebar from becoming native drags; that is now
handled by MainWindowHostingView returning false from mouseDownCanMoveWindow,
the same approach upstream Ghostty uses.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant