Skip to content

x11: fix crash when XInput 2 is unavailable - #4660

Open
mTvare6 wants to merge 1 commit into
rust-windowing:masterfrom
mTvare6:fix/xI1-panic
Open

x11: fix crash when XInput 2 is unavailable#4660
mTvare6 wants to merge 1 commit into
rust-windowing:masterfrom
mTvare6:fix/xI1-panic

Conversation

@mTvare6

@mTvare6 mTvare6 commented Aug 6, 2026

Copy link
Copy Markdown

EventLoop::new() panics while handling the XIQueryVersion reply on X servers that only support XI1, such as x2goagent.

This propagates XInput initialization failures through the existing error path and returns NotSupported when XI2 is unavailable. It does not add an XI1 fallback.

Tested with:

  • x2goagent, XI 1.3: returns Err without panicking

  • Xephyr, XI 2.4: event loop initializes successfully

  • Xorg, XI 2.3: event loop initializes successfully

  • 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 — not applicable; no API change

  • Created or updated an example program if it would help users understand this functionality — not applicable

EventLoop::new() currently panics while handling the XIQueryVersion
reply on servers that only support XI1, such as x2goagent.

Propagate XInput initialization failures through the existing error path
and return NotSupported when the server does not support XI2.
@mTvare6
mTvare6 requested a review from kchibisov as a code owner August 6, 2026 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant