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)