Repository navigation
Apply tearing hints on surface commit - #168
Open
marcoallegretti wants to merge 1 commit into
Open
marcoallegretti wants to merge 1 commit into
marcoallegretti wants to merge 1 commit into
Conversation
marcoallegretti
marked this pull request as ready for review
November 1, 2026 11:47
This was referenced Nov 1, 2026
This branch has not been deployed
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.
Fixes #153.
Presentation hints currently become visible as soon as
set_presentation_hintis dispatched. Destroying the control also resets the hint immediately. Both changes are double-buffered by the Wayland protocol, so a repaint before the next surface commit can observe the wrong hint.Store presentation hints in Smithay's cached surface state and read only the current value. Keep control-object existence immediate for duplicate-object detection. This also follows synchronized subsurface transactions without changing TTY tearing eligibility, configuration overrides, or hardware checks.
API impact: no public Rust or TypeScript API changes. Hint changes become observable at the protocol-defined commit boundary.
Validation:
cargo test -p shojiwm_lib --lib --locked protocols::tearing_control::tests: 4 passed, none ignored. Covers async/vsync commit boundaries, last pending hint, persistence across commits, destroy/reset, recreation before commit, and synchronized subsurfaces.cargo test -p shojiwm_lib --lib --locked: 317 passed, 1 failed, 4 ignored. The failure isxwayland_satellite::tests::skips_a_display_with_an_occupied_abstract_socket, which cannot prepare its socket directory because/tmp/.X11-unixis not writable. That code is unchanged.git diff --checkpass.