Skip to content

fix: stop clicks in the main window from starting a native window drag - #429

Merged
arzafran merged 2 commits into
mainfrom
fix/sidebar-resizer-fix
Oct 15, 2026
Merged

arzafran merged 2 commits into
mainfrom
fix/sidebar-resizer-fix

Conversation

@arzafran

Copy link
Copy Markdown
Member

What this does

Dragging the sidebar's right edge moved the whole window instead of resizing the sidebar. This puts the fix on main. #428 merged with only its failing test, so main CI is red until this lands.

The main window stays isMovable so the Window menu tiling items (Fill, Center) stay enabled. But a plain left mouse-down in the main window is now dispatched with movability off, so it can't start a native window drag. The real drag surfaces (the titlebar and drag handles) already turn movability back on around their own drags. Settings and Debug windows are unaffected.

Test plan

Since #413 made the main window movable, a drag on the sidebar resizer band
moved the window instead of resizing the sidebar. Keep the main window
immovable while AppKit dispatches each left mouse-down, the same way the
folder-icon guard already did, and restore it afterwards so the Window menu
tiling items still validate.
An unshown window dropped the synthetic mouse-down before hit-testing, so
the recorder never saw it, and NSHostingView does not route clicks to raw
AppKit subviews. Show the window and host the recorder via NSViewRepresentable.
@arzafran
arzafran merged commit 0b76acd into main Oct 15, 2026
13 checks passed
@arzafran
arzafran deleted the fix/sidebar-resizer-fix branch October 15, 2026 18:03
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