Skip to content

Keep window actions clear of the Dock and menu bar - #346

Merged
ospfranco merged 1 commit into
ospfranco:mainfrom
jleni:window-actions-respect-dock
Nov 9, 2026
Merged

ospfranco merged 1 commit into
ospfranco:mainfrom
jleni:window-actions-respect-dock

Conversation

@jleni

@jleni jleni commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Window actions place windows using NSScreen.frame, which is the whole display. With the Dock on the left or right, "Resize window to full-screen", halves, thirds and quarters put part of the window under the Dock. With the Dock at the bottom, the bottom edge goes under it. macOS keeps windows below the menu bar, so tops are pushed down there instead.

This switches those actions to NSScreen.visibleFrame, the area macOS leaves for windows after the Dock and menu bar:

  • UsableScreens.frameOfCurrentScreen, used by the half, third, two-thirds, quarter, full-screen and center actions
  • the target screen in "Move window to next/previous screen"

normalizeCoordinatesOf flips using the rect's maxY, so it works unchanged with visibleFrame.

Example, built-in display with the Dock on the left (macOS 27.0.1):

frame visibleFrame
reported (0, 0, 2056, 1329) (45, 0, 2011, 1290)
full-screen window today x=0, y=39, 2056×1290
full-screen window with this change x=45, y=39, 2011×1290

With the Dock set to auto-hide, visibleFrame only keeps a few points at the Dock edge, so windows still fill nearly the whole screen.

I haven't built Sol locally. The change swaps one CGRect for another of the same type.

@ospfranco
ospfranco merged commit a79d9fc into ospfranco:main Nov 9, 2026
@ospfranco

Copy link
Copy Markdown
Owner

Thanks for the PR!

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.

2 participants