[mutter] wayland: Always set the new buffer on the surface on commit
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] wayland: Always set the new buffer on the surface on commit
- Date: Sat, 12 Apr 2014 06:56:57 +0000 (UTC)
commit dbe4fc0e45c9d7450c2da22bcb738a6ede6ad7de
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Apr 11 23:29:05 2014 -0700
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 files changed, 3 insertions(+), 12 deletions(-)
---
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c
index 3d80ef0..75a1f66 100644
--- a/src/wayland/meta-wayland-surface.c
+++ b/src/wayland/meta-wayland-surface.c
@@ -146,19 +146,9 @@ ensure_buffer_texture (MetaWaylandBuffer *buffer)
}
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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]