fix(gui): reopen Connect to Radio dialog reliably under xcb (#4725) - #4803
Open
g4ivv wants to merge 2 commits into
Open
fix(gui): reopen Connect to Radio dialog reliably under xcb (#4725)#4803g4ivv wants to merge 2 commits into
g4ivv wants to merge 2 commits into
Conversation
…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>
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Investigating #4725's native-Wayland panadapter/waterfall throttling led to
QT_QPA_PLATFORM=xcbas the practical workaround — native Wayland'srender-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
xcbhad its own defect: once connected, the "Connect to Radio" dialogauto-hides, and reopening it afterward (station-label double-click or the
menu item) called
show()successfully —isVisible()reportedtrue—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 secondshow(), following a realhide(), left the window wedged in the ICCCMWithdrawnWM_STATEunderMutter/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 beforeevery re-show rather than re-mapping the stale withdrawn one.
raise()/activateWindow()also moved to a deferred event-loop turn, sinceboth 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
simulator): both the menu item and the station-label double-click
reliably reopen the dialog after connecting, repeatedly.
xprop/xwininfoconfirmWM_STATE: Normaland correct_NET_CLIENT_LIST_STACKINGmembership across repeated show/hide cycles.the xcb-observed re-show path and is a no-op on the very first show.
🤖 Generated with Claude Code