fix: add SSMenuAgent (Screen Sharing) to immovable items#238
Merged
stonerl merged 1 commit intostonerl:mainfrom Mar 1, 2026
Merged
fix: add SSMenuAgent (Screen Sharing) to immovable items#238stonerl merged 1 commit intostonerl:mainfrom
stonerl merged 1 commit intostonerl:mainfrom
Conversation
macOS prevents the SSMenuAgent menu extra (binoculars icon) from being repositioned via Command+drag. The item visually follows the cursor during the drag but springs back to its original position on mouse-up. Without this fix, Thaw attempts to move SSMenuAgent via programmatic Command+drag events, retries 8 times, and eventually shows an "SSMenuAgent took too long to respond" error dialog (EventError.itemResponseTimeout). Changes: - Add .ssMenuAgent namespace constant (com.apple.SSMenuAgent) - Add .ssMenuAgent tag constant (namespace: .ssMenuAgent, title: "Item-0") - Add ssMenuAgent to immovableItems so the layout editor disables dragging for this item - Add .ssMenuAgent to isSystemItem so windowID is ignored in equality/hashing (consistent with other system items) Verified by: - Manual Command+drag test: item springs back on mouse-up - Thaw diagnostic logs: tag=com.apple.SSMenuAgent:Item-0, sourcePID correctly resolved via XPC, ownerPID=450 (Control Center) - Layout editor drag: 8 retry attempts all fail with itemResponseTimeout - Build succeeds with xcodebuild (ad-hoc signing) Related: jordanbaird/Ice#885 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
stonerl
approved these changes
Mar 1, 2026
Owner
stonerl
left a comment
There was a problem hiding this comment.
LGTM, thank you very much for your contribution.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
macOS prevents the SSMenuAgent menu extra (binoculars / Screen Sharing icon) from being repositioned via Command+drag. The item visually follows the cursor during the drag but springs back to its original position on mouse-up. This causes Thaw to retry the move 8 times and then show an error dialog.
SSMenuAgent(com.apple.SSMenuAgent:Item-0) toimmovableItemsso the layout editor disables dragging for this item entirely.ssMenuAgentnamespace constant and tag constant following the existing pattern.ssMenuAgenttoisSystemItemfor consistent system item identityInvestigation Details
Environment
com.apple.SSMenuAgent:Item-0(sourcePID correctly resolved via XPC)Manual Command+drag test
Holding Command and dragging the binoculars icon in the menu bar: the icon follows the cursor during the drag, but when released, it springs back to its original position. This matches the behavior of Clock and Control Center (both already in
immovableItems).Layout editor drag
Dragging SSMenuAgent from the Visible bar to the Hidden bar in Thaw Settings → Menu Bar Layout produces this error dialog:
This is
EventError.itemResponseTimeout— themove()function posts Command+drag events,waitForMoveEventResponse()polls for position change, the item never moves, and after 8 retry attempts the error propagates.Diagnostic logs (from
log stream --predicate 'subsystem == "com.stonerl.Thaw"')The XPC service correctly resolves the true owner PID (44321 = SSMenuAgent), while
ownerPIDreports 450 (Control Center) due to the macOS 26 CGWindowList regression (FB18327911).Code path
LayoutBarPaddingView.move()→appState.itemManager.move(item:to:)move()passesitem.isMovablecheck (SSMenuAgent not inimmovableItems)postMoveEvents()creates Command+mouseDown/mouseUp CGEvents targeted at SSMenuAgent's sourcePIDwaitForMoveEventResponse()polls item origin for ~100ms — item never movesEventError.itemResponseTimeout→ caught by retry loopNSAlertshownContext
This issue also exists in Ice (the upstream project Thaw was forked from). I originally discovered and reported it there as jordanbaird/Ice#885, where it manifests as a "Missing bounds rectangle" error instead. Now that I'm using Thaw, I'm submitting the fix here since Thaw is the actively maintained fork. The root cause is the same: macOS prevents SSMenuAgent from being repositioned, but neither Ice nor Thaw had it in their immovable items list.
Test plan
Related: jordanbaird/Ice#885
🤖 Generated with Claude Code