Skip to content

refactor(gui): remove dead startSystemMove branch in ContainerWidget (#2601)#2645

Merged
ten9876 merged 1 commit into
aethersdr:mainfrom
Ozy311:cleanup/2601-dead-startsystemmove
May 14, 2026
Merged

refactor(gui): remove dead startSystemMove branch in ContainerWidget (#2601)#2645
ten9876 merged 1 commit into
aethersdr:mainfrom
Ozy311:cleanup/2601-dead-startsystemmove

Conversation

@Ozy311

@Ozy311 Ozy311 commented May 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Removes the unreachable startSystemMove() branch from ContainerWidget::onTitleBarDragStart() per option (a) in #2601, plus the now-unused <QWindow> include.

Why

Scope

  • 13 lines deleted, 0 added, in src/gui/containers/ContainerWidget.cpp only
  • No protocol / persistence / UX change
  • Function declaration in ContainerWidget.h and call sites are untouched — only the inner dead branch and its dead <QWindow> include go away

If floating-mode container drag returns

The correct integration point is FramelessMoveHelper, consistent with every other title bar after #2576 — not the bare QWindow::startSystemMove primitive this PR removes.

Test plan

  • Local incremental ninja -C build clean on Linux (Nobara 43, Qt 6.10.3, gcc 15.2.1) — rebuilds AetherSDR + the three container_*_test targets without errors
  • Docked-mode applet drag-to-reorder still works (untouched codepath — floating-mode branch was unreachable so no behavioral change expected)

Closes #2601


73, Ozy K6OZY
AI compute partnership: cloaked.agency — drafted with Don, our VP of Engineering agent, on Linux dev stack (nobara-dell).

…ethersdr#2601)

PR aethersdr#2576 centralized frameless title-bar move handling in FramelessMoveHelper but left ContainerWidget::onTitleBarDragStart() with a stray startSystemMove() call that:

  1. Has no Q_OS_MAC guard — would re-introduce the macOS 5–10s dead-zone bug if the branch ever fired
  2. Has no return-value check or fallback

Tracing the state machine, the branch is currently unreachable: ContainerTitleBar::mousePressEvent early-returns when m_isFloating is true and never sets m_pressed, so mouseMoveEvent never emits dragStartRequested — onTitleBarDragStart is only reached in the docked state where m_dockMode == DockMode::Floating is false.

Removing the dead branch per the issue author's recommendation (option a). If floating-mode container drag ever returns, the correct integration point is FramelessMoveHelper, not the raw QWindow::startSystemMove primitive.

Also drops the now-unused <QWindow> include.

Co-authored-by: Don @ cloaked.agency <don@cloaked.agency> & K6OZY
@Ozy311 Ozy311 marked this pull request as ready for review May 14, 2026 02:15
@Ozy311 Ozy311 requested review from jensenpat and ten9876 as code owners May 14, 2026 02:15

@aethersdr-agent aethersdr-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified the state-machine analysis against src/gui/containers/ContainerTitleBar.cpp:

  • mousePressEvent (line 159) hands off to FramelessMoveHelper::start and returns without setting m_pressed when m_isFloating == true.
  • mouseMoveEvent (line 175) early-returns when !m_pressed, so dragStartRequested is never emitted in floating mode.
  • Therefore ContainerWidget::onTitleBarDragStart is unreachable while floating, and the removed branch was the last raw startSystemMove() caller after #2576.

Also confirmed <QWindow> is unused elsewhere in the file once the branch is gone, so the include removal is correct.

Tight scope (13 lines, one file), no behavior change, and the PR description correctly points future floating-drag work at FramelessMoveHelper rather than reintroducing the bare primitive. Thanks @Ozy311 for the careful trace and the cleanup.

@ten9876 ten9876 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. State-machine trace verified — the deleted branch was genuinely unreachable. Deletion is the right call over guarding: leaves no unguarded raw primitive to resurface the macOS 5-10s dead-zone bug class if the two floating-state flags ever desync; if floating-mode container drag returns, it should route through FramelessMoveHelper like everything else after #2576.

@ten9876 ten9876 merged commit 280e20b into aethersdr:main May 14, 2026
5 checks passed
@Ozy311 Ozy311 deleted the cleanup/2601-dead-startsystemmove branch June 13, 2026 23:27
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.

ContainerWidget: clean up unreachable startSystemMove call site

2 participants