Repository navigation
wlr: expose wp_presentation - #11
Merged
Merged
Conversation
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.
Adds plain bindings for wlroots' presentation-time support:
CreatePresentationwrapswlr_presentation_create;Presentation.OnDestroywraps its destroy event;PresentationSurfaceTexturedOnOutputandPresentationSurfaceScannedOutOnOutputwrapwlr_presentation_surface_textured_on_outputandwlr_presentation_surface_scanned_out_on_output.Nothing else changes.
This is stacked on #10, so its base is that branch and the diff only shows this commit. kawa (DeedleFake/kawa#16) is pinned to this branch, which has both.
kawa needs this because GTK 4 crashes without it. A client that has no
wp_presentationglobal falls back to timing frames from thewl_outputmode's refresh rate. Nested outputs report that rate as 0, which the protocol allows. Current GTK (4.24 and main, since GNOME/gtk@beb2eda3) divides by it without a check, ingdk_wayland_surface_frame_callback, and dies with SIGFPE. With the global present, GTK uses presentation feedback, and it treats a feedback refresh of 0 as "keep the predicted interval".Verified with
go build ./...andgo vet ./...against wlroots 0.20.2. Also verified with kawa built against this branch in a nested X11 session:flatpak run org.gtk.Demo4now stays up and getswp_presentation_feedback.presentedevents. Without the global it exits with status 136 after its first frame.