Repository navigation
fix: move Share My Bar's panel by dragging its background - #869
Conversation
The borderless panel moved only from the invisible title bar strip at its top: a window's isMovableByWindowBackground doesn't move it from SwiftUI content. A view under the panel's controls now starts the window drag itself, wherever no control takes the click. Fixes #868
Before and after
259 unchanged screens
Visual review: 259 screens, none changed. |
|
🎉 This PR is included in version 0.18.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Problem
Share My Bar's borderless panel moved only from the invisible title bar strip along its top, so it wasn't clear where to grab it. Dragging its background did nothing.
Fixes #868
Changes
BarShare.swift: a newWindowDragAreasits over the panel's blurred backdrop, under its controls. Pressing it callsNSWindow.performDrag(with:), so the panel follows the pointer wherever no control takes the click, with the usual snapping and tiling. It accepts the first click, so an inactive panel moves in one drag.BarShareWindowno longer setsisMovableByWindowBackground. It had no effect: AppKit doesn't move a window by its background from SwiftUI content, and the hosting view reportsmouseDownCanMoveWindow == trueeven over the close button.Testing
aClickOnTheBackgroundMovesTheWindowAndOneOnAControlDoesntinBarShareTests. It hit-tests the panel and checks that clicks between the screen menu and ×, beside the image and beside the toolbar reach the drag view, and that clicks on the screen menu, × and the toolbar don't. Before the fix, every click landed on the hosting view.swift test --filterfor the share tests: 5 passed.scripts/check.sh --quickandnpx commitlint --from origin/mainpass.Merging
One commit; any merge method works.
Claude Opus 5.5 via Claude Code