From 49092397f2c15134706382cfa3eaae21ec73253b Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Mon, 6 Oct 2014 20:15:18 -0700 Subject: [PATCH] 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 file changed, 16 insertions(+), 15 deletions(-) diff --git a/src/wayland/meta-wayland-surface.h b/src/wayland/meta-wayland-surface.h index 30940a4ba..9f6778032 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);