[mutter] wayland: Always keep the MetaSurfaceActorWayland up-to-date



commit 03cfe602d97a903d55e76984d2b02708a49683fe
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Fri Apr 11 23:42:40 2014 -0700

    wayland: Always keep the MetaSurfaceActorWayland up-to-date
    
    The MetaSurfaceActorWayland should always accurately reflect
    the state of the MetaWaylandSurface, even if it's a cursor
    surface.

 src/wayland/meta-wayland-surface.c |   14 ++------------
 1 files changed, 2 insertions(+), 12 deletions(-)
---
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c
index fc3b4d1..53c4844 100644
--- a/src/wayland/meta-wayland-surface.c
+++ b/src/wayland/meta-wayland-surface.c
@@ -177,8 +177,6 @@ static void
 toplevel_surface_commit (MetaWaylandSurface             *surface,
                          MetaWaylandDoubleBufferedState *pending)
 {
-  actor_surface_commit (surface, pending);
-
   if (pending->newly_attached)
     {
       MetaWindow *window = surface->window;
@@ -290,8 +288,6 @@ static void
 subsurface_surface_commit (MetaWaylandSurface             *surface,
                            MetaWaylandDoubleBufferedState *pending)
 {
-  actor_surface_commit (surface, pending);
-
   if (pending->newly_attached)
     {
       MetaSurfaceActor *surface_actor = surface->surface_actor;
@@ -340,20 +336,14 @@ commit_double_buffered_state (MetaWaylandSurface             *surface,
   if (pending->newly_attached)
     surface_set_buffer (surface, pending->buffer);
 
+  actor_surface_commit (surface, pending);
+
   if (surface == compositor->seat->cursor_surface)
     cursor_surface_commit (surface, pending);
   else if (surface->window)
     toplevel_surface_commit (surface, pending);
   else if (surface->subsurface.resource)
     subsurface_surface_commit (surface, pending);
-  else
-    {
-      /* Unknown surface type. In this case, it's most likely a XWayland
-       * surface that we haven't gotten the ClientMessage for yet. Make
-       * sure *not* to reset the double-buffered state or do anything too
-       * fancy. */
-      return;
-    }
 
   g_list_foreach (surface->subsurfaces, parent_surface_committed, NULL);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]