Skip to content

fix(gui): reopen Connect to Radio dialog reliably under xcb (#4725) - #4803

Open
g4ivv wants to merge 2 commits into
aethersdr:mainfrom
g4ivv:fix-4725-wayland-waterfall
Open

fix(gui): reopen Connect to Radio dialog reliably under xcb (#4725)#4803
g4ivv wants to merge 2 commits into
aethersdr:mainfrom
g4ivv:fix-4725-wayland-waterfall

Conversation

@g4ivv

@g4ivv g4ivv commented Aug 6, 2026

Copy link
Copy Markdown

Summary

Investigating #4725's native-Wayland panadapter/waterfall throttling led to
QT_QPA_PLATFORM=xcb as the practical workaround — native Wayland's
render-pipeline stalls on this platform have no clean in-app fix (see the
README note added here; a lot was tried: native-window isolation, a
GPU-presentation watchdog, periodic surface recreation — all either
ineffective or trading the freeze for a recurring visible flash. This looks
like a genuine Qt wayland-platform-plugin defect, not something AetherSDR's
own code controls).

But xcb had its own defect: once connected, the "Connect to Radio" dialog
auto-hides, and reopening it afterward (station-label double-click or the
menu item) called show() successfully — isVisible() reported true
yet nothing appeared, not even in the window switcher, making it impossible
to disconnect. That made the workaround worse than the problem it solves.

Root cause

Confirmed with xprop/xwininfo: the second show(), following a real
hide(), left the window wedged in the ICCCM Withdrawn WM_STATE under
Mutter/XWayland — genuinely unmapped, absent from _NET_CLIENT_LIST_STACKING,
not just unfocused or stacked behind the main window. The very first show
(before ever being hidden) always worked, which is why this only surfaced
after connecting. Not reproduced under native Wayland, which has no ICCCM
Withdrawn/Normal state machine to get stuck in.

Fix

showConnectionDialog() now destroys and recreates the native window before
every re-show rather than re-mapping the stale withdrawn one.
raise()/activateWindow() also moved to a deferred event-loop turn, since
both call sites reach this function from inside a live X11 input/grab context
(a menu popup's own grab teardown, or the station label's double-click still
being dispatched).

Test plan

  • Confirmed fixed against real FlexRadio hardware (not just the demo
    simulator): both the menu item and the station-label double-click
    reliably reopen the dialog after connecting, repeatedly.
  • xprop/xwininfo confirm WM_STATE: Normal and correct
    _NET_CLIENT_LIST_STACKING membership across repeated show/hide cycles.
  • Existing build is unaffected on other platforms — the fix only touches
    the xcb-observed re-show path and is a no-op on the very first show.

🤖 Generated with Claude Code

…r#4725)

Investigating aethersdr#4725's native-Wayland panadapter/waterfall throttling
led to QT_QPA_PLATFORM=xcb as the practical workaround (native Wayland
render-pipeline stalls on this platform have no clean in-app fix — see
the README note). But xcb had its own defect: once connected, the
"Connect to Radio" dialog auto-hides, and reopening it afterward
(station-label double-click or the menu item) called show()
successfully — isVisible() reported true — yet nothing appeared,
not even in the window switcher, making it impossible to disconnect.

Root cause, confirmed with xprop/xwininfo: the second show(),
following a real hide(), left the window wedged in the ICCCM
Withdrawn WM_STATE under Mutter/XWayland — genuinely unmapped, absent
from _NET_CLIENT_LIST_STACKING, not just unfocused or stacked behind
the main window. The very first show (before ever being hidden)
always worked, which is why this only surfaced after connecting.
Not reproduced under native Wayland, which has no ICCCM
Withdrawn/Normal state machine to get stuck in.

Fix: showConnectionDialog() now destroys and recreates the native
window before every re-show rather than re-mapping the stale
withdrawn one. raise()/activateWindow() also moved to a deferred
event-loop turn, since both call sites reach this function from
inside a live X11 input/grab context (a menu popup's own grab
teardown, or the station label's double-click still being
dispatched).

Confirmed fixed against real FlexRadio hardware (not just the demo
simulator): both the menu item and the station-label double-click
now reliably reopen the dialog after connecting.

Also documents the underlying Wayland throttling issue in the README
as a known limitation with QT_QPA_PLATFORM=xcb as the workaround —
investigated at length (native-window isolation, a GPU-presentation
watchdog, periodic surface recreation) but no in-app fix was found
that didn't trade the freeze for a recurring visible flash; this
looks like a genuine Qt wayland-platform-plugin defect rather than
something AetherSDR's own code controls.

Reported by @JonathanPerkins.

Co-Authored-By: Claude Sonnet 5 <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.

1 participant