Skip to content

Fix UI freeze when PanAdapter is popped out into floating window (#1668)#1669

Merged
ten9876 merged 2 commits into
mainfrom
aetherclaude/issue-1668
Apr 22, 2026
Merged

Fix UI freeze when PanAdapter is popped out into floating window (#1668)#1669
ten9876 merged 2 commits into
mainfrom
aetherclaude/issue-1668

Conversation

@aethersdr-agent

Copy link
Copy Markdown
Contributor

Summary

Fixes #1668

What was changed

Fix UI freeze when PanAdapter is popped out into floating window (#1668)

Files modified

  • src/gui/PanFloatingWindow.cpp
  • src/gui/PanFloatingWindow.h
  • src/gui/PanadapterStack.cpp
 src/gui/PanFloatingWindow.cpp | 34 ++++++++++++++++++++++++++++++++++
 src/gui/PanFloatingWindow.h   |  2 ++
 src/gui/PanadapterStack.cpp   | 19 +++++++++++--------
 3 files changed, 47 insertions(+), 8 deletions(-)

Generated by AetherClaude (automated agent for AetherSDR)

The float path reparented the applet through nullptr (splitter → nullptr
→ floating window), which on macOS created a transient top-level
NSWindow that corrupted the main window's NSResponder chain, freezing
all input until re-dock.

Fix: add PanFloatingWindow::adoptApplet() which reparents via
addWidget() directly into the floating window, skipping the nullptr
intermediate — mirroring how the dock path already works (#1344).

Also defer sw->show() until after refreshAfterReparent() so Metal
initializes on the final NSView surface, preventing render glitches.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@aethersdr-agent

Copy link
Copy Markdown
Contributor Author

CI Build Failure Analysis

Hey @aethersdr-agent[bot] — thanks for tackling #1668, this is a great approach to avoid the NSResponder chain corruption!

What failed

Both the build and analyze (cpp) jobs failed at the Build step. The root cause is a constructor ambiguity in PanFloatingWindow.

The problem

The PR adds a new constructor overload:

explicit PanFloatingWindow(QWidget* parent = nullptr);  // NEW

alongside the existing one:

PanFloatingWindow(PanadapterApplet* applet, QWidget* parent = nullptr);  // EXISTING

Then in PanadapterStack.cpp, the call:

auto* fw = new PanFloatingWindow(nullptr);

is ambiguous — the compiler can't decide whether nullptr is a QWidget* (matching the new constructor) or a PanadapterApplet* (matching the existing constructor's first parameter, with parent defaulting to nullptr). Both are equally valid implicit conversions from std::nullptr_t.

How to fix

Option A — Use an explicit cast at the call site:

auto* fw = new PanFloatingWindow(static_cast<QWidget*>(nullptr));

Option B (cleaner) — Remove the default value from the new constructor's parameter, since you're always calling it with an explicit nullptr anyway:

explicit PanFloatingWindow(QWidget* parent);  // no default

This eliminates the ambiguity entirely and makes the intent clear.

Not your fault

The logic of the fix (avoiding the transient top-level NSWindow by reparenting directly via adoptApplet()) looks correct and well-reasoned. This is just a C++ overload resolution edge case. The analyze (cpp) / CodeQL failure is a cascading consequence of the same build error — once the build compiles, CodeQL will pass too.

Keep up the great work! 🎙️

PR #1669 added a new PanFloatingWindow(QWidget*) constructor to support
the adopt-after-construct flow that avoids setParent(nullptr). The old
PanFloatingWindow(PanadapterApplet*, QWidget*) constructor was left in
place but has no callers — and its presence makes PanFloatingWindow(nullptr)
ambiguous, breaking the build.

Removing the unused overload resolves the ambiguity.
@ten9876 ten9876 marked this pull request as ready for review April 22, 2026 04:54
@ten9876 ten9876 self-requested a review as a code owner April 22, 2026 04:54

@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.

Reviewed with user (who has personally reproduced the bug). The primary NSResponder theory may or may not apply — reporter never confirmed — but the secondary fix (moving sw->show() into the deferred callback after refreshAfterReparent) is the likely fix for the 'floating window content freezes, main window unaffected' variant user has reproduced locally. Rendering on a stale Metal/NSView surface before rebind is a real problem.

Pushed a 1-commit cleanup removing the unused PanFloatingWindow(applet, parent) constructor that was causing PanFloatingWindow(nullptr) to be ambiguous and break the build.

@ten9876 ten9876 enabled auto-merge (squash) April 22, 2026 04:54
@ten9876 ten9876 merged commit 964626c into main Apr 22, 2026
4 checks passed
@ten9876 ten9876 deleted the aetherclaude/issue-1668 branch April 22, 2026 04:59
ten9876 added a commit that referenced this pull request Apr 22, 2026
)

Cuts a community-contribution-heavy point release. Eight community PRs
landed plus three AetherClaude crash fixes. Highlights:

Community:
- Fix RADE RX not decoding on Windows (#1820, NF0T)
- Clamp stale DAX RX backlog on macOS — fixes +1.5s FT8 DT bias (#1822, jensenpat)
- Fix TCI DAX resampler crosstalk between slices (#1815, Chaosuk97)
- Fix RX applet pan slider with NR active (#1799, Chaosuk97)
- Fix TCI RX gain default 1.0 → 0.5 to match applet (#1811, NF0T)
- Fix HAVE_SERIALPORT guard (#1812, NF0T)
- Seamless ADIF logbook auto-reload (#1801, Chaosuk97)
- RAC Canada band-plan corrections (#1817, VE3NEM)

AetherClaude crash fixes:
- Applet reorder with floating containers (#1745#1746)
- Lazy-build RadioSetupDialog tabs, dodges Wayland FFmpeg/VDPAU crash (#1776#1777)
- PanAdapter float-freeze — show-after-reset + direct reparent (#1668#1669)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

v0.8.17 - UI freezes when PanAdapter is popped out; recovers on re-dock

2 participants