Skip to content

Keep windows clear leaves a window under the bar after a double-click fills it #935

Done

Description

@M4n0x

What happens

With Keep windows clear of the bar on and System Settings → Desktop & Dock → Double-click a window's title bar to set to Fill, double-clicking a window's title bar leaves it filling the screen under the bar. StableBar shrinks the window, macOS puts the filled frame straight back, and StableBar doesn't try again. The window stays under the bar until it is moved.

A user reported it with Calendar and Ardia on a 14-inch MacBook Pro: their screenshot shows Calendar's toolbar and window buttons under the bar.

Steps to reproduce

  1. Turn on Keep windows clear of the bar, with Accessibility access and no window manager.
  2. Set Double-click a window's title bar to to Fill, then open Calendar (an app reads the setting when it launches).
  3. Double-click Calendar's toolbar.

Expected

The window fills the area below the bar, as it does with Zoom.

Environment

  • Reporter: macOS 27.2.1, 14-inch MacBook Pro (M1 Pro, notch), menu bar hidden by StableBar, no window manager.
  • Reproduced: StableBar 0.19.0 and main at 8590fcd in a macOS 27.2 tart VM. Calendar, Ardia and Discord all stay under the bar with Fill, on every try; with Zoom or the default setting, all three are corrected.

Evidence

A logging build in the VM:

538.133–538.330  12 × AXWindowResized       Fill animates the window to 0,0 1024x712
538.489          set size 1024x672 -> success, now 0,0 1024x672
538.497          AXWindowResized             macOS puts 0,0 1024x712 back
538.651          skip: already adjusted from this frame

With StableBar paused, a probe shrank a filled window after a set quiet time. macOS put the filled frame back for every shrink less than about 330 ms after the animation's last frame; every shrink at 350 ms or later stayed (10 runs). StableBar acts 150 ms after the last notification.

Diagnosis

WindowClearance.adjustWindows (Sources/StableBar/MenuBar/WindowClearance.swift) remembers the frame it adjusted a window from, in adjustedFrames, and skips the window while it keeps that frame. That stops it from fighting an app that refuses a change (#621), but it also gives up when macOS undoes the change once, as it does for a window it has just filled. A retry after a longer wait, at most a few times, would keep both.

Related

Triaged by Claude Code (claude-opus-5-5).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugreleased

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions