Skip to content

Frameless pop-out windows for all applets and panadapters#1922

Merged
ten9876 merged 6 commits intomainfrom
claude/frameless-popouts
Apr 25, 2026
Merged

Frameless pop-out windows for all applets and panadapters#1922
ten9876 merged 6 commits intomainfrom
claude/frameless-popouts

Conversation

@ten9876
Copy link
Copy Markdown
Owner

@ten9876 ten9876 commented Apr 25, 2026

Summary

All floating containers (`FloatingContainerWindow` + `PanFloatingWindow`) now use `Qt::FramelessWindowHint`. The native title bars are removed; each applet's existing 16-18 px title strip becomes the drag handle and houses the dock/close affordances.

Mechanics

  • Title-bar drag → `window()->windowHandle()->startSystemMove()` — Qt 6's cross-platform compositor primitive (X11, Wayland, Windows, macOS).
  • `QSizeGrip` in the bottom-right of every floating window so users can still resize without OS edge handles.
  • `ContainerTitleBar`'s `×` button auto-hides while floating since the `↩` dock button covers the same intent. Re-shows when re-docked.
  • `PanadapterApplet`'s `×` stays visible — that one deletes the panadapter (a distinct action from dock).
  • `setWindowFlags()` is called in the body in addition to the constructor flag pass, to work around a Qt-on-Windows quirk where the constructor bitmask is sometimes ignored.

Code

  • `FloatingContainerWindow` opens with FramelessWindowHint and appends a `QSizeGrip` after the container.
  • `ContainerWidget::onTitleBarDragStart` routes to `startSystemMove` when floating; falls through to QDrag-reorder when docked.
  • `ContainerTitleBar` tracks `m_closeAllowed`/`m_isFloating` to compute effective close-button visibility, preserving the explicit hide used by the sidebar root container.
  • `PanFloatingWindow` gets FramelessWindowHint + QSizeGrip.
  • `PanadapterApplet`'s title strip is exposed as `m_titleBar`; `eventFilter` detects mouse press on it and calls `startSystemMove` when floating.

Branch history

5 commits — initial + Windows debugging cycle. Two Windows-specific guards were tried and reverted; final state is uniform cross-platform frameless.

Test plan

🤖 Generated with Claude Code

ten9876 and others added 6 commits April 24, 2026 20:20
All floating containers (FloatingContainerWindow + PanFloatingWindow)
now use Qt::FramelessWindowHint.  Native title bars are removed; each
applet's existing 16-18 px title strip becomes the drag handle and
houses the dock/close affordances.

Mechanics:
- Title-bar drag → window()->windowHandle()->startSystemMove() — Qt 6's
  cross-platform compositor primitive (X11, Wayland, Windows, macOS).
- QSizeGrip in bottom-right of every floating window so the user can
  still resize without OS edge handles.
- ContainerTitleBar's × button auto-hides while floating since the ↩
  dock button covers the same intent.  Re-shows when re-docked.
- PanadapterApplet's × stays visible — that one deletes the panadapter
  (a distinct action from dock).

Code:
- FloatingContainerWindow always opens with FramelessWindowHint and
  appends a QSizeGrip after the container.
- ContainerWidget::onTitleBarDragStart routes to startSystemMove when
  floating; falls through to QDrag-reorder when docked.
- ContainerTitleBar tracks m_closeAllowed/m_isFloating to compute
  effective close-button visibility, preserving the explicit hide
  used by the sidebar root container.
- PanFloatingWindow gets FramelessWindowHint + QSizeGrip.
- PanadapterApplet's title strip is exposed as m_titleBar; eventFilter
  detects mouse press on it and calls startSystemMove when floating.

macOS note: PanFloatingWindow has known native-NSView fragility
(#1344, #1668).  Adding FramelessWindowHint changes the native peer
type — needs a careful macOS check on first run before we ship.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
On Windows the constructor flag bitmask
(QWidget(parent, Qt::Window | Qt::FramelessWindowHint)) is sometimes
ignored — the native title bar still gets drawn.  Calling
setWindowFlags() with the same flags AFTER construction (before show())
forces the Windows platform plugin to honour the hint reliably across
Qt versions.

Symptoms reported on Windows: applet pop-outs still framed, and
panadapter pop-out crashing because the layout (QSizeGrip + GPU
spectrum widget) was wired for frameless but the actual window came
up framed.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…OS only)

FramelessWindowHint on Windows is unreliable — the constructor flag
bitmask is sometimes ignored so the native title bar still gets drawn,
and combined with QRhiWidget reparenting (the GPU spectrum) it
triggers a crash on panadapter pop-out.

Walk it back to Q_OS_WIN-guarded native frames everywhere.  Linux and
macOS still get frameless pop-outs with QSizeGrip resize and
startSystemMove drag — same behaviour as before this commit.  Windows
goes back to native chrome: native title bar moves the window, native
edges resize it, no QSizeGrip.

The × hide-on-float behaviour stays platform-independent — still good
UX even with a native title bar, since ↩ does the same thing.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…-pop crash)

Skip installEventFilter on PanadapterApplet's title-bar widget on
Windows.  The filter only exists to support startSystemMove drags on
frameless pop-outs (Linux/macOS); Windows keeps its native frame and
doesn't need it.

Side effect of installing the filter on Windows: title-bar mouse press
fired emit activated(panId) → PanadapterStack::setActivePan, a code
path v0.8.22 never exercised on title-bar clicks.  On a floating
panadapter this destabilised the second float→dock→re-float cycle and
crashed on re-pop.

Behaviour on Windows now matches v0.8.22 exactly for the panadapter
pop-out path.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@ten9876 ten9876 enabled auto-merge (squash) April 25, 2026 04:44
@ten9876 ten9876 merged commit bdbaed2 into main Apr 25, 2026
4 checks passed
@ten9876 ten9876 deleted the claude/frameless-popouts branch April 25, 2026 04:52
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