Skip to content

x11: prevent fatal WARP-CLIENT-BETA-STABLE-89S1 when setting WM hints fails - #18

Merged
acarl005 merged 1 commit into
warpdotdev/v0.30.xfrom
factory/x11-user-attention-no-panic
Sep 1, 2026
Merged

x11: prevent fatal WARP-CLIENT-BETA-STABLE-89S1 when setting WM hints fails#18
acarl005 merged 1 commit into
warpdotdev/v0.30.xfrom
factory/x11-user-attention-no-panic

Conversation

@warp-agent-staging

@warp-agent-staging warp-agent-staging Bot commented Sep 1, 2026

Copy link
Copy Markdown

Prevents fatal WARP-CLIENT-BETA-STABLE-89S1 / issue 7703839050. X11 request_user_attention no longer panics when WmHints::set returns an I/O or connection error.

Behavior is unchanged unless that WM_HINTS request fails. On success the cookie is still ignore_error()'d, so X11 server errors stay ignored. On send failure the call now returns instead of aborting.

  • Tested on all platforms changed — X11 compile only; no live display
  • Added an entry to the changelog module if knowledge of this change could be valuable to users — no public API change except no panic on this send failure
  • 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

Summary

Warp rings the terminal bell while inactive through this best-effort API. A dead X11 connection made expect_then_ignore_error abort the process.

Changes

  • Treat WmHints::set send errors as recoverable, matching WmHints::get in the same function and destroy_window in Drop.
  • Rebased onto warpdotdev/v0.30.x (Warp's pinned winit SHA) so the change lands in the source Warp actually uses.

Verification

  • rustfmt +nightly --check --edition 2021 src/platform_impl/linux/x11/window.rs passed. Full-repo cargo +nightly fmt -- --check still fails on pre-existing Warp patches in windows/event_loop.rs, not this change.
  • cargo check --no-default-features --features=x11 passed
  • No unit test: this path has no practical seam without an X11 connection

@warp-agent-staging

Copy link
Copy Markdown
Author

This PR was generated with Warp.

Comment @warp-factory on this PR to send it follow-up work.

View run View conversation

@advait-m
advait-m marked this pull request as ready for review September 1, 2026 16:37
@advait-m
advait-m requested a review from acarl005 September 1, 2026 16:38
request_user_attention is best-effort. Ignore I/O errors from
WmHints::set the same way get already falls back, so a dead
connection cannot abort the process.
@warp-agent-staging
warp-agent-staging Bot changed the base branch from master to warpdotdev/v0.30.x September 1, 2026 19:05
@warp-agent-staging
warp-agent-staging Bot force-pushed the factory/x11-user-attention-no-panic branch from eec3ac9 to f401953 Compare September 1, 2026 19:05
@acarl005
acarl005 merged commit 14db95a into warpdotdev/v0.30.x Sep 1, 2026
13 of 113 checks passed
acarl005 pushed a commit to warpdotdev/warp that referenced this pull request Sep 1, 2026
## Description
Pin winit to
[warpdotdev/winit#18](warpdotdev/winit#18)
(`14db95a686387211d57cf2afd1d908b2d82a20fe`) so X11
`request_user_attention` no longer panics when `WmHints::set` fails on a
dead connection.

## Linked Issue
- [ ] The linked issue is labeled `ready-to-spec` or
`ready-to-implement`.
- [ ] Where appropriate, screenshots or a short video of the
implementation are included below (especially for user-visible or UI
changes).

No GitHub issue. Requested after merging the winit fix.

## Testing
- [ ] I have manually tested my changes locally with `./script/run`

Metadata-only pin. `cargo metadata --locked` accepts the lockfile. On
Linux, `cargo check -p winit --locked` and `cargo check -p warpui
--locked` passed.

## Agent Mode
- [ ] Warp Agent Mode - This PR was created via Warp's AI Agent Mode

CHANGELOG-BUG-FIX: Prevent a crash on Linux/X11 when Warp requests user
attention over a dead display connection.

<!-- warp:pr-description-artifacts start -->
<!-- warp:pr-description-artifacts end -->

Co-authored-by: warp-agent-staging[bot] <240773466+warp-agent-staging[bot]@users.noreply.github.com>
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.

1 participant