Skip to content

fix: prevent ghost window and item list wipe#709

Open
Kasui92 wants to merge 1 commit intoabenz1267:masterfrom
omakasui:fix-guard-walker
Open

fix: prevent ghost window and item list wipe#709
Kasui92 wants to merge 1 commit intoabenz1267:masterfrom
omakasui:fix-guard-walker

Conversation

@Kasui92
Copy link
Copy Markdown

@Kasui92 Kasui92 commented Mar 30, 2026

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 walker window 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 to pkill -f walker and 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 walker running as a --gapplication-service on 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 walker momentarily loses focus (compositor animations, click outside, etc.), active_window() returns None. The window remains visible and stuck, unresponsive to further close attempts.

Bug 2: Item list wiped on rapid reopen.

The idle_add_once callback in quit() unconditionally called w.items.remove_all(). If a new invocation of walker arrived and populated the list between quit() scheduling the idle and its execution, the callback would wipe the freshly loaded items, leaving an empty window.

@Kasui92
Copy link
Copy Markdown
Author

Kasui92 commented Mar 31, 2026

Updated.
I simplified the original commit.

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