[mutter] wayland-surface: Group MetaWaylandSurface members logically



commit 49092397f2c15134706382cfa3eaae21ec73253b
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Oct 6 20:15:18 2014 -0700

    wayland-surface: Group MetaWaylandSurface members logically
    
    And add comments so that we know what's what. This cleans up the struct.

 src/wayland/meta-wayland-surface.h |   31 ++++++++++++++++---------------
 1 files changed, 16 insertions(+), 15 deletions(-)
---
diff --git a/src/wayland/meta-wayland-surface.h b/src/wayland/meta-wayland-surface.h
index 30940a4..9f67780 100644
--- a/src/wayland/meta-wayland-surface.h
+++ b/src/wayland/meta-wayland-surface.h
@@ -77,23 +77,33 @@ typedef struct
 
 struct _MetaWaylandSurface
 {
+  /* Generic stuff */
   struct wl_resource *resource;
   MetaWaylandCompositor *compositor;
   MetaSurfaceActor *surface_actor;
   MetaWindow *window;
-  struct wl_resource *xdg_shell_resource;
+  MetaWaylandBuffer *buffer;
+  struct wl_listener buffer_destroy_listener;
+  int scale;
+  int32_t offset_x, offset_y;
+  GList *subsurfaces;
+
+  /* All the pending state that wl_surface.commit will apply. */
+  MetaWaylandPendingState pending;
+
+  /* Extension structs. */
   MetaWaylandSurfaceExtension xdg_surface;
   MetaWaylandSurfaceExtension xdg_popup;
   MetaWaylandSurfaceExtension wl_shell_surface;
   MetaWaylandSurfaceExtension gtk_surface;
   MetaWaylandSurfaceExtension subsurface;
-  int scale;
-
-  MetaWaylandBuffer *buffer;
-  struct wl_listener buffer_destroy_listener;
 
-  GList *subsurfaces;
+  /* xdg_surface stuff */
+  struct wl_resource *xdg_shell_resource;
+  MetaWaylandSerial acked_configure_serial;
+  gboolean has_set_geometry;
 
+  /* wl_subsurface stuff. */
   struct {
     MetaWaylandSurface *parent;
     struct wl_listener parent_destroy_listener;
@@ -114,15 +124,6 @@ struct _MetaWaylandSurface
     gboolean pending_pos;
     GSList *pending_placement_ops;
   } sub;
-
-  int32_t offset_x, offset_y;
-
-  gboolean has_set_geometry;
-
-  /* All the pending state that wl_surface.commit will apply. */
-  MetaWaylandPendingState pending;
-
-  MetaWaylandSerial acked_configure_serial;
 };
 
 void                meta_wayland_shell_init     (MetaWaylandCompositor *compositor);


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