fix: prevent ghost window and item list wipe#709
Open
Kasui92 wants to merge 1 commit intoabenz1267:masterfrom
Open
fix: prevent ghost window and item list wipe#709Kasui92 wants to merge 1 commit intoabenz1267:masterfrom
Kasui92 wants to merge 1 commit intoabenz1267:masterfrom
Conversation
c5e3e0f to
f04f046
Compare
Author
|
Updated. |
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.
To be transparent, I got help from Claude Code for this fix, so consider this a suggestion rather than the definitive solution.
I repeatedly ran into an issue where a
walkerwindow would hang after closing on GNOME (both 46 and 48). Even refocusing it and trying to close it again didn’t work. The only way to recover was topkill -f walkerand restart it.Since I wasn’t sure where the problem originated and I don’t know Rust, I started investigating to identify the bottleneck. This is what I came up with:
Two related bugs affecting
walkerrunning as a--gapplication-serviceon compositors without native wlr-layer-shell support (e.g. GNOME):Bug 1: Ghost window that cannot be closed.
On GNOME, active_window() returns the window that the compositor considers focused. If
walkermomentarily loses focus (compositor animations, click outside, etc.),active_window()returnsNone. The window remains visible and stuck, unresponsive to further close attempts.Bug 2: Item list wiped on rapid reopen.
The
idle_add_oncecallback inquit()unconditionally calledw.items.remove_all(). If a new invocation ofwalkerarrived and populated the list betweenquit()scheduling the idle and its execution, the callback would wipe the freshly loaded items, leaving an empty window.