Skip to content

Cherry-pick #2058: FramelessResizer for all-edge resize on frameless windows#2068

Merged
ten9876 merged 1 commit intomainfrom
auto/Cherry-pick-2058-FramelessResizer-for-all-edge-res
Apr 27, 2026
Merged

Cherry-pick #2058: FramelessResizer for all-edge resize on frameless windows#2068
ten9876 merged 1 commit intomainfrom
auto/Cherry-pick-2058-FramelessResizer-for-all-edge-res

Conversation

@ten9876
Copy link
Copy Markdown
Owner

@ten9876 ten9876 commented Apr 27, 2026

Originally by @chibondking — popped-out panadapter and applet windows
use Qt::FramelessWindowHint which removes OS-provided resize borders.
Previously a single QSizeGrip in the bottom-right corner; unreliable
on Wayland and only one corner.

FramelessResizer is a small QObject event filter installed on the
QWindow (native handle) — sees mouse events at the platform level
before they're dispatched to the widget hierarchy. Edge proximity
within 6 px → cursor change + startSystemResize on left-click.
Crucially, never touches the widget event stream, so nested controls
(knobs, drag tiles, chain widget) respond normally even when near
the window edge. Resolves the regression that caused the v1
implementation (#2008) to be reverted.

Two cursor-leak guards added on top of the cherry-pick:

  • Destructor calls leaveEdgeZone() so windows destroyed while at an
    edge don't leak the override cursor onto the desktop.
  • The existing leaveEdgeZone() inside the eventFilter Phase 2 early
    return (when the window flips to decorated mode at runtime via
    [fix] Frameless toggle not propagating to open floating windows #2059's setFramelessMode) ensures the override is restored when
    the resizer becomes a no-op.

Closes #2058.

Co-Authored-By: CJ Johnson [email protected]
Co-Authored-By: Claude Opus 4.7 (1M context) [email protected]

…windows

Originally by @chibondking — popped-out panadapter and applet windows
use Qt::FramelessWindowHint which removes OS-provided resize borders.
Previously a single QSizeGrip in the bottom-right corner; unreliable
on Wayland and only one corner.

FramelessResizer is a small QObject event filter installed on the
QWindow (native handle) — sees mouse events at the platform level
before they're dispatched to the widget hierarchy.  Edge proximity
within 6 px → cursor change + startSystemResize on left-click.
Crucially, never touches the widget event stream, so nested controls
(knobs, drag tiles, chain widget) respond normally even when near
the window edge.  Resolves the regression that caused the v1
implementation (#2008) to be reverted.

Two cursor-leak guards added on top of the cherry-pick:

- Destructor calls leaveEdgeZone() so windows destroyed while at an
  edge don't leak the override cursor onto the desktop.
- The existing leaveEdgeZone() inside the eventFilter Phase 2 early
  return (when the window flips to decorated mode at runtime via
  #2059's setFramelessMode) ensures the override is restored when
  the resizer becomes a no-op.

Closes #2058.

Co-Authored-By: CJ Johnson <[email protected]>
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@ten9876 ten9876 requested a review from jensenpat as a code owner April 27, 2026 00:41
@ten9876 ten9876 enabled auto-merge (squash) April 27, 2026 00:41
@ten9876 ten9876 merged commit c215b4c into main Apr 27, 2026
4 checks passed
@ten9876 ten9876 deleted the auto/Cherry-pick-2058-FramelessResizer-for-all-edge-res branch April 27, 2026 00:50
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