From dbe4fc0e45c9d7450c2da22bcb738a6ede6ad7de Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Fri, 11 Apr 2014 23:29:05 -0700 Subject: [PATCH] wayland: Always set the new buffer on the surface on commit Even when it doesn't have a role. This fixes cursors not quite working right, as they're a "detached" surface without a role since nobody called set_cursor on them yet. --- src/wayland/meta-wayland-surface.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c index 3d80ef0d7..75a1f6627 100644 --- a/src/wayland/meta-wayland-surface.c +++ b/src/wayland/meta-wayland-surface.c @@ -145,20 +145,10 @@ ensure_buffer_texture (MetaWaylandBuffer *buffer) buffer->texture = texture; } -static void -commit_attached_buffer (MetaWaylandSurface *surface, - MetaWaylandDoubleBufferedState *pending) -{ - if (pending->newly_attached) - surface_set_buffer (surface, pending->buffer); -} - static void cursor_surface_commit (MetaWaylandSurface *surface, MetaWaylandDoubleBufferedState *pending) { - commit_attached_buffer (surface, pending); - if (pending->newly_attached) meta_wayland_seat_update_cursor_surface (surface->compositor->seat); } @@ -169,8 +159,6 @@ actor_surface_commit (MetaWaylandSurface *surface, { MetaSurfaceActor *surface_actor = surface->surface_actor; - commit_attached_buffer (surface, pending); - if (pending->newly_attached && pending->buffer) { ensure_buffer_texture (pending->buffer); @@ -356,6 +344,9 @@ commit_double_buffered_state (MetaWaylandSurface *surface, { MetaWaylandCompositor *compositor = surface->compositor; + if (pending->newly_attached) + surface_set_buffer (surface, pending->buffer); + if (surface == compositor->seat->cursor_surface) cursor_surface_commit (surface, pending); else if (surface->window)