Skip to content

fix: sidebar edge drag moves the window instead of resizing the sidebar - #428

Merged
arzafran merged 1 commit into
mainfrom
fix/sidebar-resizer-moves-window
Oct 15, 2026
Merged

arzafran merged 1 commit into
mainfrom
fix/sidebar-resizer-moves-window

Conversation

@arzafran

Copy link
Copy Markdown
Member

What this does

Dragging the sidebar's edge moved the whole window instead of resizing the sidebar. That started with #413, which made the main window movable so the Window menu's tiling items would work. This fix keeps those menu items working and stops ordinary clicks in the main window from turning into window drags.

Summary

programa_sendEvent in Sources/WindowSwizzles.swift already set isMovable = false while AppKit dispatched a mouse-down, but only for clicks on folder icons. It now does that for every left mouse-down in a main window (one whose content view is a MainWindowHostingView), and sets it back to true afterwards. Deliberate drag surfaces (WindowDragHandleView and the titlebar-background fallback) already re-enable it around their own performDrag, so window dragging from the top bar still works. Other windows such as Settings and the Debug windows are unaffected.

Review order:

  1. 00ffb09b2c: regression tests only. CI should fail on the main-window test.
  2. 7c961f5ff8: the fix and a CHANGELOG line.

Test plan

  • The test-only commit's unit-tests job fails on testMainWindowMouseDownDispatchKeepsWindowImmovableThenRestoresMovable
  • The fix commit's unit-tests job passes both new WindowMoveSuppressionHitPathTests cases
  • Manually checked in a tagged Debug build: dragging the sidebar edge resizes it, dragging the top bar moves the window, and Window > Fill / Center are enabled

@arzafran
arzafran merged commit da37c6d into main Oct 15, 2026
11 of 13 checks passed
@arzafran
arzafran deleted the fix/sidebar-resizer-moves-window branch October 19, 2026 21:16
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