Repository navigation
WaylandBackend: fix Wayland protocol violation and reuse cursor surface - #2441
Open
connormclaud wants to merge 1 commit into
Open
connormclaud wants to merge 1 commit into
connormclaud wants to merge 1 commit into
Conversation
connormclaud
marked this pull request as ready for review
September 26, 2026 20:50
Upstream CWaylandBackend prematurely destroyed wl_buffer objects immediately after surface commit via defer(wl_buffer_destroy(pBuffer)), violating the wl_surface.attach and wl_buffer specifications in wayland.xml. When the host compositor processes the commit, the buffer resource is already invalid, triggering runtime check failures in GNOME Shell: meta_wayland_cursor_surface_constructed: runtime check failed: (!buffer || buffer->resource) Additionally, CWaylandBackend was destroying and re-allocating the wl_surface on every cursor frame update, causing surface role churn for animated cursors. This patch: 1. Implements a wl_buffer_listener that defers wl_buffer_destroy until the host compositor issues a wl_buffer.release event. 2. Allows CursorInfoToSurface to take an existing wl_surface, reusing the surface across cursor updates rather than reallocating. Relates to ValveSoftware#2432
connormclaud
force-pushed
the
fix-wayland-cursor-protocol
branch
from
October 6, 2026 17:16
0aef1ec to
7bb10fc
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.
Upstream CWaylandBackend prematurely destroyed wl_buffer objects
immediately after surface commit via defer(wl_buffer_destroy(pBuffer)),
violating the wl_surface.attach and wl_buffer specifications in wayland.xml.
When the host compositor processes the commit, the buffer resource is
already invalid, triggering runtime check failures in GNOME Shell:
meta_wayland_cursor_surface_constructed: runtime check failed: (!buffer || buffer->resource)
Additionally, CWaylandBackend was destroying and re-allocating the
wl_surface on every cursor frame update, causing surface role churn
for animated cursors.
This patch:
the host compositor issues a wl_buffer.release event.
the surface across cursor updates rather than reallocating.
Relates to #2432