Skip to content

x11: treat WmHints send failure as recoverable - #23

Draft
warp-agent-staging[bot] wants to merge 1 commit into
warpdotdev/v0.30.xfrom
factory/fix-wm-hints-panic
Draft

warp-agent-staging[bot] wants to merge 1 commit into
warpdotdev/v0.30.xfrom
factory/fix-wm-hints-panic

Conversation

@warp-agent-staging

Copy link
Copy Markdown

On a dead X11 connection, WmHints::set() returns Err(ConnectionError). The current code calls expect_then_ignore_error(), which panics on the Err variant, causing Warp to abort (Sentry WARP-CLIENT-BETA-STABLE-89S1). This makes the send failure recoverable: silently drop it, and on success keep ignoring the cookie the same way.

What changed

request_user_attention in src/platform_impl/linux/x11/window.rs now uses if let Ok(cookie) instead of expect_then_ignore_error, matching the get-side's existing graceful error handling.

Validation

cargo check --lib -p winit --features x11 passes cleanly.

  • Tested on all platforms changed
  • Added an entry to the changelog module if knowledge of this change could be valuable to users
  • Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
  • Created or updated an example program if it would help users understand this functionality
  • Updated feature matrix, if new features were added or implemented

This PR was created by Warp (running Claude Code).

When the X11 connection is dead, WmHints::set() returns a ConnectionError.
The previous code called expect_then_ignore_error() which panics on Err,
causing Warp to abort (Sentry WARP-CLIENT-BETA-STABLE-89S1).

Use if-let instead: silently drop a send failure, and on success keep
ignoring the cookie the same way.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants