Repository navigation
Conversation
Some XWayland/JUCE apps (e.g. Surge XT) quit their UI on Super+W but leave an empty mapped surface. Close cooperatively first, then destroy leftover surfaces so the yellow empty window does not stick around. Fixes omacom#13308 Co-authored-by: AnPod <AnPod@users.noreply.github.com>
a8b447f to
84dc880
Compare
chessing234
left a comment
There was a problem hiding this comment.
please preserve save-confirmation dialogs when closing windows.
| fi | ||
| done | ||
|
|
||
| # Still mapped: either the client ignored close, or it died and left a ghost. |
There was a problem hiding this comment.
please keep ordinary close requests cooperative: a window can still be mapped after 250 ms because it is waiting for the user to answer a save/discard dialog, and this path sends its entire process SIGTERM then SIGKILL (including native wayland clients). gate force-killing on an explicit user action or a positively identified zombie, otherwise super+w can discard unsaved work and close other windows of the same app.
|
| hyprctl dispatch "hl.dsp.window.close({ window = \"address:$addr\" })" >/dev/null 2>&1 || | ||
| hyprctl dispatch killwindow "address:$addr" >/dev/null 2>&1 || |
There was a problem hiding this comment.
| grep -q 'window.close({ window = "address:0xzombie" })' "$log_file" || | ||
| fail "zombie close still sends an initial close" "log: $(< "$log_file")" | ||
| # Second close / killwindow after the surface refused to leave. | ||
| closes=$(grep -c '0xzombie' "$log_file" || true) | ||
| (( closes >= 2 )) || | ||
| fail "zombie close force-targets the stuck surface" "log: $(< "$log_file")" |
There was a problem hiding this comment.
| if ! hyprctl clients -j 2>/dev/null | jq -e --arg addr "$addr" \ | ||
| 'any(.[]; .address == $addr)' >/dev/null 2>&1; then | ||
| exit 0 | ||
| fi |
There was a problem hiding this comment.
|
Thanks for taking this on. I reviewed it at 3e619d6 and it isn't ready yet. Two things stand in the way: the bug doesn't reproduce, and the force path can never run. The bug didn't reproduce. On a disposable worker built from the Omarchy ISO (Hyprland 0.56.2, The force path never forces anything (
The zombie test passes either way ( Scope. Today SUPER+W and SUPER+Q are Hyprland's built-in close. This PR turns every press into a bash script that runs What ran: the PR's Codex Medium reviewed it as a second opinion. It agreed with each point above, but it can read this review's working notes, so it isn't fully independent. It found the focus race and the vacuous zombie test on its own reading. I didn't push anything to the branch, since the bug it fixes isn't established yet. Next step is with the author, or with a reproduction from #13308. |
Summary
Fixes #13308
Some XWayland/JUCE apps (e.g. Surge XT) quit on Super+W but leave an empty mapped surface.
Change
Test plan
bash test/shell.d/hyprland-window-close-test.sh