Skip to content

On X11, don't panic in request_user_attention when WM hints fail to send - #37

Draft
warp-agent-staging[bot] wants to merge 1 commit into
benchmark-run-114-trial-7191-attempt-1/8lti82oj08fqq-winit-base-pinfrom
benchmark-run-114-trial-7191-attempt-1/8lti82oj08fqq-winit-recoverable-wmhints
Draft

warp-agent-staging[bot] wants to merge 1 commit into
benchmark-run-114-trial-7191-attempt-1/8lti82oj08fqq-winit-base-pinfrom
benchmark-run-114-trial-7191-attempt-1/8lti82oj08fqq-winit-recoverable-wmhints

Conversation

@warp-agent-staging

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

Copy link
Copy Markdown

On X11, Window::request_user_attention set the urgency WM hint through
expect_then_ignore_error, which panics if the request fails to send — for
example when the X11 connection is dead. Warp rings the terminal bell while a
window is inactive via request_user_attention, so a dead connection at that
moment aborts the whole process (Sentry WARP-CLIENT-BETA-STABLE-89S1).

Consumed by warpdotdev/warp-for-benchmarks#100, which points Warp's winit pin at this revision.

Treat the send failure as recoverable: on error, log it via warn! and carry
on; on success, keep ignoring the reply cookie exactly as before. Matching the
Result mirrors how neighbouring X11 code (e.g. the focus path) already
tolerates transient connection failures.

Testing

cargo check --no-default-features --features x11,rwh_06 passes. The X11
platform backend has no mock-connection test harness (its only unit tests cover
pure parsing), so a regression test for the dead-connection send path would
require inventing connection-mocking infrastructure that does not exist; the fix
is a local change from panic to log-and-continue and is verified by inspection
and by the build.

  • 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).

Window::request_user_attention set the urgency WM hints via
expect_then_ignore_error, which panics if the request fails to send
(for example when the X11 connection is dead). Ringing the terminal
bell while the window is inactive could therefore abort the process.

Treat the send failure as recoverable: log the error and continue,
while still ignoring the reply cookie on success as before.

Co-Authored-By: Claude Opus 4.8 <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