Repository navigation
Conversation
Track the XTest key and button presses belonging to each virtual device. Release them during disposal, including when the creating remote desktop backend disappears without sending release events. Return reserved keysym mappings and clear their latched modifier levels as well. Only synthesize events in the tracked X11 key and button ranges, avoiding wire-level truncation leaving an untracked pressed key or button. linuxmint/xdg-desktop-portal-xapp#13 Signed-off-by: radkawar <radkawar28@gmail.com>
radkawar
force-pushed
the
fix/x11-release-held-input
branch
from
October 24, 2026 04:08
8d4ce8f to
cf6a975
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
X11 virtual input devices currently leave keys and buttons pressed when their last reference disappears. A portal backend crash can therefore leave Shift and a mouse button held on the local desktop.
Track the keycodes/buttons actually submitted to XTest and release them in dispose. For held keysyms, also undo the corresponding modifier latch and return reserved keycodes to the existing keymap pool. Reject out-of-range codes before indexing the tracking arrays. This does not enable RemoteDesktop by default or include the separate keycode/scroll fixes.
Tested on a genuine Mint 22.3 Cinnamon X11 golden VM:
Native test witness and fork integration: https://github.com/radkawar/xdg-desktop-portal-xapp/tree/assistance/muffin-remote-desktop . This is not a request to merge that portal implementation.
AI disclosure: implementation and testing were assisted by OpenAI Codex. Commits are signed off.