Skip to content

x11: don't panic in request_user_attention when WM hints send fails - #38

Draft
warp-agent-staging[bot] wants to merge 1 commit into
warpdotdev/v0.30.xfrom
benchmark-run-114-trial-7190-attempt-1/01a0ea45-f2e5-76ec-b364-82e14616ab71/x11-request-user-attention-no-panic
Draft

warp-agent-staging[bot] wants to merge 1 commit into
warpdotdev/v0.30.xfrom
benchmark-run-114-trial-7190-attempt-1/01a0ea45-f2e5-76ec-b364-82e14616ab71/x11-request-user-attention-no-panic

Conversation

@warp-agent-staging

@warp-agent-staging warp-agent-staging Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

On Linux/X11, Window::request_user_attention set the urgency WM hint with expect_then_ignore_error, which calls .expect() on the send result and panics if the request cannot be written to the X11 connection. When the connection is dead, that panic aborts the whole process — Warp sees this as fatal crash WARP-CLIENT-BETA-STABLE-89S1, triggered simply by the terminal bell ringing while the window is inactive.

This treats a failed send as recoverable: on Err we log a warning and return instead of panicking. On Ok the returned cookie is still ignore_error()'d exactly as before, so any later X error reply is swallowed the same way and behavior on the healthy path is unchanged. Requesting user attention is best-effort, so dropping it on a broken connection is the right degradation.

Applied on top of the commit Warp pins (a4e0ecb5), which is the source for the warpdotdev/v0.30.x pin. Consumed by warp via warpdotdev/warp-for-benchmarks#98, which bumps the pin to this commit.

Testing

  • cargo check --no-default-features --features x11,rwh_06
  • cargo clippy --no-default-features --features x11,rwh_06 — clean
  • cargo +nightly fmt

No automated regression test is included: reaching this branch requires a live UnownedWindow bound to a dead X11 connection, and winit has no test seam to inject one without adding production-only plumbing. The change is a mechanical panic→log conversion that reuses the existing ignore_error() idiom already used throughout this file.

Checklist:

  • Tested on all platforms changed (X11)
  • Added an entry to the changelog module
  • Updated documentation — no user-facing API change
  • Created or updated an example program — not applicable
  • Updated feature matrix — no new features

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

`Window::request_user_attention` set the urgency WM hint with
`expect_then_ignore_error`, which panics if the request cannot be sent
over the X11 connection. When the connection is dead this aborts the
process (Warp Sentry WARP-CLIENT-BETA-STABLE-89S1) even though the caller
only wanted to ring the bell / flag the window.

Treat a send failure as recoverable: log a warning and return. On success
the returned cookie is ignored exactly as before, so any resulting X error
reply is still swallowed.

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