Skip to content

Open links with open::that_detached to avoid freezing the UI - #186

Merged
astex merged 1 commit into
masterfrom
fix-blocking-open
Aug 27, 2026
Merged

Open links with open::that_detached to avoid freezing the UI#186
astex merged 1 commit into
masterfrom
fix-blocking-open

Conversation

@astex

@astex astex commented Aug 27, 2026

Copy link
Copy Markdown
Owner

Both link-opening call sites used open::that, which spawns the handler and waits for it to exit. On Linux that means xdg-open, which does not return until the browser it launched exits — so if no browser was already running, the UI thread sat in waitpid for the browser's entire lifetime and the window was frozen, ignoring input and burning no CPU. Switched both to open::that_detached, the non-blocking variant of the same crate.

This was diagnosed on a live desktop from /proc on the frozen process. A separate issue was observed after releasing the wait — the process went to ~200% CPU with the smithay-clipboard thread in a tight read loop rather than recovering — which is not addressed here and would need a fresh reproduction.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UL2Y1HFGgYbQcyhBsUa3DU

@astex
astex merged commit 6bfc434 into master Aug 27, 2026
5 checks passed
@astex
astex deleted the fix-blocking-open branch August 27, 2026 19:37
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