Repository navigation
input/tablet: Send frame right after proximity_out - #2260
Merged
Drakulix merged 1 commit intoNov 4, 2026
Merged
Conversation
1 task done
Ph4ntomas
reviewed
Nov 3, 2026
faetalize
force-pushed
the
fix/2259-tablet-tool-proximity-out-frame
branch
from
November 3, 2026 20:06
54927b4 to
5fff2ef
Compare
Ph4ntomas
approved these changes
Nov 3, 2026
Ph4ntomas
left a comment
Contributor
There was a problem hiding this comment.
One small nitpick regarding the comment, but looks good to me, thanks!
When the tool moved between two surfaces of the same client, motion() sent proximity_out and proximity_in back to back, and both frames only went out later from frame(). The client saw proximity_out and proximity_in in one frame, followed by a duplicate frame. GTK applies proximity_in right away but proximity_out only on the frame, so it ended up with no focus and pen taps on menus were lost. Send previous_focus its frame between the two instead. Taking it there also stops frame() from sending it a second time. Other proximity_out paths keep deferring the frame to the compositor's frame() call. mutter and wlroots also send a frame between proximity_out and proximity_in.
faetalize
force-pushed
the
fix/2259-tablet-tool-proximity-out-frame
branch
from
November 3, 2026 20:27
5fff2ef to
ad4f22f
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.
Description
Fixes #2259
when the tool moves between two surfaces of the same client,
motion()now sends the old focus its frame betweenproximity_outandproximity_in. before, both frames only went out later fromframe(), so the client sawproximity_outandproximity_inin one frame, followed by a duplicate frame. every otherproximity_outpath still leaves the frame to the compositor'sframe()call, like 5c9782d intended (thanks @Ph4ntomas for the suggestion).it's technically a workaround for a client bug: gtk applies
proximity_inright away butproximity_outonly on the frame, so it ends up with no focus and pen taps on menus get lost. gtk side: https://gitlab.gnome.org/GNOME/gtk/-/work_items/8525. mutter and wlroots both send a frame between the two too.before, one crossing:
after:
tested on bento (niri fork) with a wacom intuos pt m and gtk 4.24.1: taps on menus and popovers register again, and there were no double frames across 10 crossings. that run was on the first version of this PR, which sent the frame from
proximity_out(). this version gives the same order for a crossing and leaves the other paths as they were.Checklist