Skip to content

Allow dragging the floating window from the top and show resize cursors - #93

Open
robert-corlett wants to merge 1 commit into
f:masterfrom
robert-corlett:floating-window-drag-and-resize-cursors
Open

Allow dragging the floating window from the top and show resize cursors#93
robert-corlett wants to merge 1 commit into
f:masterfrom
robert-corlett:floating-window-drag-and-resize-cursors

Conversation

@robert-corlett

Copy link
Copy Markdown

Adds floating window top drag bar and resize cursors on edge hover - #90
Issue also mentions persisting the size and position of a manually resized floating window - added this functionality in a seperate pull request #91

The floating overlay is a borderless panel, so it has no title bar to drag by and no frame to provide resize cursors. Moving it meant catching the few points of window border, and the edges gave no indication they could be dragged.

Add a grab bar across the top of the window that starts a window drag, styled after the resize handle already used by the pinned overlay, and an edge overlay that shows the standard frame resize cursors on the sides and bottom. The top edge is left to the drag bar.

The cursors are driven by tracking areas rather than cursor rects: the overlay is a non-activating panel that never becomes key, and cursor rects only apply to the key window. The overlay declines hit testing, so the window continues to handle the resize itself and the content underneath stays interactive.

Both are skipped in follow-cursor mode, where the panel ignores mouse events and positions itself.

Builds clean on current master (1b2f26d), Debug and Release, arm64.
Verified drag via top bar.
Verified resize cursors along bottom edge, bottom left+right corners, and left+right sides.

The floating overlay is a borderless panel, so it has no title bar to drag by
and no frame to provide resize cursors. Moving it meant catching the few points
of window border, and the edges gave no indication they could be dragged.

Add a grab bar across the top of the window that starts a window drag, styled
after the resize handle already used by the pinned overlay, and an edge overlay
that shows the standard frame resize cursors on the sides and bottom. The top
edge is left to the drag bar.

The cursors are driven by tracking areas rather than cursor rects: the overlay
is a non-activating panel that never becomes key, and cursor rects only apply to
the key window. The overlay declines hit testing, so the window continues to
handle the resize itself and the content underneath stays interactive.

Both are skipped in follow-cursor mode, where the panel ignores mouse events and
positions itself.
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