Skip to content

wlr: expose wp_presentation - #11

Merged
DeedleFake merged 1 commit into
xdg-popup-unconstrainfrom
presentation-time
Oct 1, 2026
Merged

DeedleFake merged 1 commit into
xdg-popup-unconstrainfrom
presentation-time

Conversation

@DeedleFake

Copy link
Copy Markdown
Owner

Adds plain bindings for wlroots' presentation-time support:

  • CreatePresentation wraps wlr_presentation_create;
  • Presentation.OnDestroy wraps its destroy event;
  • PresentationSurfaceTexturedOnOutput and PresentationSurfaceScannedOutOnOutput wrap wlr_presentation_surface_textured_on_output and wlr_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_presentation global falls back to timing frames from the wl_output mode'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, in gdk_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 ./... and go vet ./... against wlroots 0.20.2. Also verified with kawa built against this branch in a nested X11 session: flatpak run org.gtk.Demo4 now stays up and gets wp_presentation_feedback.presented events. Without the global it exits with status 136 after its first frame.

@DeedleFake
DeedleFake merged commit d6c792a into xdg-popup-unconstrain Oct 1, 2026
2 checks passed
@DeedleFake
DeedleFake deleted the presentation-time branch October 1, 2026 15:54
DeedleFake added a commit that referenced this pull request Oct 1, 2026
… and seat selections (#10)

* wlr: expose XDGPopup.UnconstrainFromBox

* wlr: expose fd event sources on EventLoop

* wlr: expose Xwayland.SetSeat

* wlr: expose seat selection requests

* wlr: expose wp_presentation (#11)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant