[mutter] wayland: Shorten MetaWaylandSurfaceRoleShellSurface name



commit d8f13f6b4cbd68cf364d334064b22a6376f35db0
Author: Jonas Ådahl <jadahl gmail com>
Date:   Wed Dec 13 12:37:23 2017 +0800

    wayland: Shorten MetaWaylandSurfaceRoleShellSurface name
    
    It was annoyingly long, so rename it to MetaWaylandShellSurface.
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/5
    https://bugzilla.gnome.org/show_bug.cgi?id=791938

 src/wayland/meta-wayland-surface.c   | 124 +++++++++++++++++------------------
 src/wayland/meta-wayland-surface.h   |  32 ++++-----
 src/wayland/meta-wayland-wl-shell.c  |  45 +++++++------
 src/wayland/meta-wayland-wl-shell.h  |   2 +-
 src/wayland/meta-wayland-xdg-shell.c |  78 +++++++++++-----------
 src/wayland/meta-wayland-xdg-shell.h |   4 +-
 6 files changed, 140 insertions(+), 145 deletions(-)
---
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c
index bea809d86..6f4db20cd 100644
--- a/src/wayland/meta-wayland-surface.c
+++ b/src/wayland/meta-wayland-surface.c
@@ -100,8 +100,8 @@ G_DEFINE_TYPE (MetaWaylandSurfaceRoleActorSurface,
                meta_wayland_surface_role_actor_surface,
                META_TYPE_WAYLAND_SURFACE_ROLE);
 
-G_DEFINE_TYPE (MetaWaylandSurfaceRoleShellSurface,
-               meta_wayland_surface_role_shell_surface,
+G_DEFINE_TYPE (MetaWaylandShellSurface,
+               meta_wayland_shell_surface,
                META_TYPE_WAYLAND_SURFACE_ROLE_ACTOR_SURFACE);
 
 G_DEFINE_TYPE (MetaWaylandPendingState,
@@ -156,23 +156,23 @@ static MetaWaylandSurface *
 meta_wayland_surface_role_get_toplevel (MetaWaylandSurfaceRole *surface_role);
 
 static void
-meta_wayland_surface_role_shell_surface_configure (MetaWaylandSurfaceRoleShellSurface *shell_surface_role,
-                                                   int                                 new_x,
-                                                   int                                 new_y,
-                                                   int                                 new_width,
-                                                   int                                 new_height,
-                                                   MetaWaylandSerial                  *sent_serial);
+meta_wayland_shell_surface_configure (MetaWaylandShellSurface *shell_surface,
+                                      int                      new_x,
+                                      int                      new_y,
+                                      int                      new_width,
+                                      int                      new_height,
+                                      MetaWaylandSerial       *sent_serial);
 
 static void
-meta_wayland_surface_role_shell_surface_ping (MetaWaylandSurfaceRoleShellSurface *shell_surface_role,
-                                              uint32_t                            serial);
+meta_wayland_shell_surface_ping (MetaWaylandShellSurface *shell_surface,
+                                 uint32_t                 serial);
 
 static void
-meta_wayland_surface_role_shell_surface_close (MetaWaylandSurfaceRoleShellSurface *shell_surface_role);
+meta_wayland_shell_surface_close (MetaWaylandShellSurface *shell_surface);
 
 static void
-meta_wayland_surface_role_shell_surface_managed (MetaWaylandSurfaceRoleShellSurface *shell_surface_role,
-                                                 MetaWindow                         *window);
+meta_wayland_shell_surface_managed (MetaWaylandShellSurface *shell_surface,
+                                    MetaWindow              *window);
 
 static void
 surface_actor_mapped_notify (MetaSurfaceActorWayland *surface_actor,
@@ -1746,44 +1746,44 @@ meta_wayland_surface_configure_notify (MetaWaylandSurface *surface,
                                        int                 new_height,
                                        MetaWaylandSerial  *sent_serial)
 {
-  MetaWaylandSurfaceRoleShellSurface *shell_surface_role =
-    META_WAYLAND_SURFACE_ROLE_SHELL_SURFACE (surface->role);
+  MetaWaylandShellSurface *shell_surface =
+    META_WAYLAND_SHELL_SURFACE (surface->role);
 
   g_signal_emit (surface, surface_signals[SURFACE_CONFIGURE], 0);
 
-  meta_wayland_surface_role_shell_surface_configure (shell_surface_role,
-                                                     new_x, new_y,
-                                                     new_width, new_height,
-                                                     sent_serial);
+  meta_wayland_shell_surface_configure (shell_surface,
+                                        new_x, new_y,
+                                        new_width, new_height,
+                                        sent_serial);
 }
 
 void
 meta_wayland_surface_ping (MetaWaylandSurface *surface,
                            guint32             serial)
 {
-  MetaWaylandSurfaceRoleShellSurface *shell_surface_role =
-    META_WAYLAND_SURFACE_ROLE_SHELL_SURFACE (surface->role);
+  MetaWaylandShellSurface *shell_surface =
+    META_WAYLAND_SHELL_SURFACE (surface->role);
 
-  meta_wayland_surface_role_shell_surface_ping (shell_surface_role, serial);
+  meta_wayland_shell_surface_ping (shell_surface, serial);
 }
 
 void
 meta_wayland_surface_delete (MetaWaylandSurface *surface)
 {
-  MetaWaylandSurfaceRoleShellSurface *shell_surface_role =
-    META_WAYLAND_SURFACE_ROLE_SHELL_SURFACE (surface->role);
+  MetaWaylandShellSurface *shell_surface =
+    META_WAYLAND_SHELL_SURFACE (surface->role);
 
-  meta_wayland_surface_role_shell_surface_close (shell_surface_role);
+  meta_wayland_shell_surface_close (shell_surface);
 }
 
 void
 meta_wayland_surface_window_managed (MetaWaylandSurface *surface,
                                      MetaWindow         *window)
 {
-  MetaWaylandSurfaceRoleShellSurface *shell_surface_role =
-    META_WAYLAND_SURFACE_ROLE_SHELL_SURFACE (surface->role);
+  MetaWaylandShellSurface *shell_surface =
+    META_WAYLAND_SHELL_SURFACE (surface->role);
 
-  meta_wayland_surface_role_shell_surface_managed (shell_surface_role, window);
+  meta_wayland_shell_surface_managed (shell_surface, window);
 }
 
 void
@@ -2088,51 +2088,51 @@ meta_wayland_surface_role_get_surface (MetaWaylandSurfaceRole *role)
 }
 
 static void
-meta_wayland_surface_role_shell_surface_configure (MetaWaylandSurfaceRoleShellSurface *shell_surface_role,
-                                                   int                                 new_x,
-                                                   int                                 new_y,
-                                                   int                                 new_width,
-                                                   int                                 new_height,
-                                                   MetaWaylandSerial                  *sent_serial)
+meta_wayland_shell_surface_configure (MetaWaylandShellSurface *shell_surface,
+                                      int                      new_x,
+                                      int                      new_y,
+                                      int                      new_width,
+                                      int                      new_height,
+                                      MetaWaylandSerial       *sent_serial)
 {
-  MetaWaylandSurfaceRoleShellSurfaceClass *shell_surface_role_class =
-    META_WAYLAND_SURFACE_ROLE_SHELL_SURFACE_GET_CLASS (shell_surface_role);
+  MetaWaylandShellSurfaceClass *shell_surface_class =
+    META_WAYLAND_SHELL_SURFACE_GET_CLASS (shell_surface);
 
-  shell_surface_role_class->configure (shell_surface_role,
-                                       new_x,
-                                       new_y,
-                                       new_width,
-                                       new_height,
-                                       sent_serial);
+  shell_surface_class->configure (shell_surface,
+                                  new_x,
+                                  new_y,
+                                  new_width,
+                                  new_height,
+                                  sent_serial);
 }
 
 static void
-meta_wayland_surface_role_shell_surface_ping (MetaWaylandSurfaceRoleShellSurface *shell_surface_role,
-                                              uint32_t                            serial)
+meta_wayland_shell_surface_ping (MetaWaylandShellSurface *shell_surface,
+                                 uint32_t                 serial)
 {
-  MetaWaylandSurfaceRoleShellSurfaceClass *shell_surface_role_class =
-    META_WAYLAND_SURFACE_ROLE_SHELL_SURFACE_GET_CLASS (shell_surface_role);
+  MetaWaylandShellSurfaceClass *shell_surface_class =
+    META_WAYLAND_SHELL_SURFACE_GET_CLASS (shell_surface);
 
-  shell_surface_role_class->ping (shell_surface_role, serial);
+  shell_surface_class->ping (shell_surface, serial);
 }
 
 static void
-meta_wayland_surface_role_shell_surface_close (MetaWaylandSurfaceRoleShellSurface *shell_surface_role)
+meta_wayland_shell_surface_close (MetaWaylandShellSurface *shell_surface)
 {
-  MetaWaylandSurfaceRoleShellSurfaceClass *shell_surface_role_class =
-    META_WAYLAND_SURFACE_ROLE_SHELL_SURFACE_GET_CLASS (shell_surface_role);
+  MetaWaylandShellSurfaceClass *shell_surface_class =
+    META_WAYLAND_SHELL_SURFACE_GET_CLASS (shell_surface);
 
-  shell_surface_role_class->close (shell_surface_role);
+  shell_surface_class->close (shell_surface);
 }
 
 static void
-meta_wayland_surface_role_shell_surface_managed (MetaWaylandSurfaceRoleShellSurface *shell_surface_role,
-                                                 MetaWindow                         *window)
+meta_wayland_shell_surface_managed (MetaWaylandShellSurface *shell_surface,
+                                    MetaWindow              *window)
 {
-  MetaWaylandSurfaceRoleShellSurfaceClass *shell_surface_role_class =
-    META_WAYLAND_SURFACE_ROLE_SHELL_SURFACE_GET_CLASS (shell_surface_role);
+  MetaWaylandShellSurfaceClass *shell_surface_class =
+    META_WAYLAND_SHELL_SURFACE_GET_CLASS (shell_surface);
 
-  shell_surface_role_class->managed (shell_surface_role, window);
+  shell_surface_class->managed (shell_surface, window);
 }
 
 void
@@ -2200,8 +2200,8 @@ meta_wayland_surface_role_actor_surface_class_init (MetaWaylandSurfaceRoleActorS
 }
 
 static void
-shell_surface_role_surface_commit (MetaWaylandSurfaceRole  *surface_role,
-                                   MetaWaylandPendingState *pending)
+meta_wayland_shell_surface_surface_commit (MetaWaylandSurfaceRole  *surface_role,
+                                           MetaWaylandPendingState *pending)
 {
   MetaWaylandSurface *surface =
     meta_wayland_surface_role_get_surface (surface_role);
@@ -2213,7 +2213,7 @@ shell_surface_role_surface_commit (MetaWaylandSurfaceRole  *surface_role,
   double scale;
 
   surface_role_class =
-    META_WAYLAND_SURFACE_ROLE_CLASS (meta_wayland_surface_role_shell_surface_parent_class);
+    META_WAYLAND_SURFACE_ROLE_CLASS (meta_wayland_shell_surface_parent_class);
   surface_role_class->commit (surface_role, pending);
 
   buffer = surface->buffer_ref.buffer;
@@ -2233,17 +2233,17 @@ shell_surface_role_surface_commit (MetaWaylandSurfaceRole  *surface_role,
 }
 
 static void
-meta_wayland_surface_role_shell_surface_init (MetaWaylandSurfaceRoleShellSurface *role)
+meta_wayland_shell_surface_init (MetaWaylandShellSurface *role)
 {
 }
 
 static void
-meta_wayland_surface_role_shell_surface_class_init (MetaWaylandSurfaceRoleShellSurfaceClass *klass)
+meta_wayland_shell_surface_class_init (MetaWaylandShellSurfaceClass *klass)
 {
   MetaWaylandSurfaceRoleClass *surface_role_class =
     META_WAYLAND_SURFACE_ROLE_CLASS (klass);
 
-  surface_role_class->commit = shell_surface_role_surface_commit;
+  surface_role_class->commit = meta_wayland_shell_surface_surface_commit;
 }
 
 static void
diff --git a/src/wayland/meta-wayland-surface.h b/src/wayland/meta-wayland-surface.h
index e4eada963..026aeb2a0 100644
--- a/src/wayland/meta-wayland-surface.h
+++ b/src/wayland/meta-wayland-surface.h
@@ -81,27 +81,27 @@ struct _MetaWaylandSurfaceRoleActorSurfaceClass
   MetaWaylandSurfaceRoleClass parent_class;
 };
 
-#define META_TYPE_WAYLAND_SURFACE_ROLE_SHELL_SURFACE (meta_wayland_surface_role_shell_surface_get_type ())
-G_DECLARE_DERIVABLE_TYPE (MetaWaylandSurfaceRoleShellSurface,
-                          meta_wayland_surface_role_shell_surface,
-                          META, WAYLAND_SURFACE_ROLE_SHELL_SURFACE,
+#define META_TYPE_WAYLAND_SHELL_SURFACE (meta_wayland_shell_surface_get_type ())
+G_DECLARE_DERIVABLE_TYPE (MetaWaylandShellSurface,
+                          meta_wayland_shell_surface,
+                          META, WAYLAND_SHELL_SURFACE,
                           MetaWaylandSurfaceRoleActorSurface);
 
-struct _MetaWaylandSurfaceRoleShellSurfaceClass
+struct _MetaWaylandShellSurfaceClass
 {
   MetaWaylandSurfaceRoleActorSurfaceClass parent_class;
 
-  void (*configure) (MetaWaylandSurfaceRoleShellSurface *shell_surface_role,
-                     int                                 new_x,
-                     int                                 new_y,
-                     int                                 new_width,
-                     int                                 new_height,
-                     MetaWaylandSerial                  *sent_serial);
-  void (*managed) (MetaWaylandSurfaceRoleShellSurface *shell_surface_role,
-                   MetaWindow                         *window);
-  void (*ping) (MetaWaylandSurfaceRoleShellSurface *shell_surface_role,
-                uint32_t                            serial);
-  void (*close) (MetaWaylandSurfaceRoleShellSurface *shell_surface_role);
+  void (*configure) (MetaWaylandShellSurface *shell_surface,
+                     int                      new_x,
+                     int                      new_y,
+                     int                      new_width,
+                     int                      new_height,
+                     MetaWaylandSerial       *sent_serial);
+  void (*managed) (MetaWaylandShellSurface *shell_surface,
+                   MetaWindow              *window);
+  void (*ping) (MetaWaylandShellSurface *shell_surface,
+                uint32_t                 serial);
+  void (*close) (MetaWaylandShellSurface *shell_surface);
 };
 
 #define META_TYPE_WAYLAND_SURFACE_ROLE_SUBSURFACE (meta_wayland_surface_role_subsurface_get_type ())
diff --git a/src/wayland/meta-wayland-wl-shell.c b/src/wayland/meta-wayland-wl-shell.c
index 3b69f39b0..86d809193 100644
--- a/src/wayland/meta-wayland-wl-shell.c
+++ b/src/wayland/meta-wayland-wl-shell.c
@@ -46,7 +46,7 @@ typedef enum
 
 struct _MetaWaylandWlShellSurface
 {
-  MetaWaylandSurfaceRoleShellSurface parent;
+  MetaWaylandShellSurface parent;
 
   struct wl_resource *resource;
 
@@ -71,7 +71,7 @@ popup_surface_iface_init (MetaWaylandPopupSurfaceInterface *iface);
 
 G_DEFINE_TYPE_WITH_CODE (MetaWaylandWlShellSurface,
                          meta_wayland_wl_shell_surface,
-                         META_TYPE_WAYLAND_SURFACE_ROLE_SHELL_SURFACE,
+                         META_TYPE_WAYLAND_SHELL_SURFACE,
                          G_IMPLEMENT_INTERFACE (META_TYPE_WAYLAND_POPUP_SURFACE,
                                                 popup_surface_iface_init));
 
@@ -616,15 +616,15 @@ wl_shell_surface_role_get_toplevel (MetaWaylandSurfaceRole *surface_role)
 }
 
 static void
-wl_shell_surface_role_configure (MetaWaylandSurfaceRoleShellSurface *shell_surface_role,
-                                 int                                 new_x,
-                                 int                                 new_y,
-                                 int                                 new_width,
-                                 int                                 new_height,
-                                 MetaWaylandSerial                  *sent_serial)
+wl_shell_surface_role_configure (MetaWaylandShellSurface *shell_surface,
+                                 int                      new_x,
+                                 int                      new_y,
+                                 int                      new_width,
+                                 int                      new_height,
+                                 MetaWaylandSerial       *sent_serial)
 {
   MetaWaylandWlShellSurface *wl_shell_surface =
-    META_WAYLAND_WL_SHELL_SURFACE (shell_surface_role);
+    META_WAYLAND_WL_SHELL_SURFACE (shell_surface);
 
   if (!wl_shell_surface->resource)
     return;
@@ -635,28 +635,28 @@ wl_shell_surface_role_configure (MetaWaylandSurfaceRoleShellSurface *shell_surfa
 }
 
 static void
-wl_shell_surface_role_managed (MetaWaylandSurfaceRoleShellSurface *shell_surface_role,
-                               MetaWindow                         *window)
+wl_shell_surface_role_managed (MetaWaylandShellSurface *shell_surface,
+                               MetaWindow              *window)
 {
   MetaWaylandWlShellSurface *wl_shell_surface =
-    META_WAYLAND_WL_SHELL_SURFACE (shell_surface_role);
+    META_WAYLAND_WL_SHELL_SURFACE (shell_surface);
 
   if (wl_shell_surface->state == META_WL_SHELL_SURFACE_STATE_POPUP)
     meta_window_set_type (window, META_WINDOW_DROPDOWN_MENU);
 }
 
 static void
-wl_shell_surface_role_ping (MetaWaylandSurfaceRoleShellSurface *shell_surface_role,
-                            guint32                             serial)
+wl_shell_surface_role_ping (MetaWaylandShellSurface *shell_surface,
+                            guint32                  serial)
 {
   MetaWaylandWlShellSurface *wl_shell_surface =
-    META_WAYLAND_WL_SHELL_SURFACE (shell_surface_role);
+    META_WAYLAND_WL_SHELL_SURFACE (shell_surface);
 
   wl_shell_surface_send_ping (wl_shell_surface->resource, serial);
 }
 
 static void
-wl_shell_surface_role_close (MetaWaylandSurfaceRoleShellSurface *shell_surface_role)
+wl_shell_surface_role_close (MetaWaylandShellSurface *shell_surface)
 {
   /* Not supported by wl_shell_surface. */
 }
@@ -726,7 +726,7 @@ meta_wayland_wl_shell_surface_class_init (MetaWaylandWlShellSurfaceClass *klass)
 {
   GObjectClass *object_class;
   MetaWaylandSurfaceRoleClass *surface_role_class;
-  MetaWaylandSurfaceRoleShellSurfaceClass *shell_surface_role_class;
+  MetaWaylandShellSurfaceClass *shell_surface_class;
 
   object_class = G_OBJECT_CLASS (klass);
   object_class->finalize = wl_shell_surface_role_finalize;
@@ -735,12 +735,11 @@ meta_wayland_wl_shell_surface_class_init (MetaWaylandWlShellSurfaceClass *klass)
   surface_role_class->commit = wl_shell_surface_role_commit;
   surface_role_class->get_toplevel = wl_shell_surface_role_get_toplevel;
 
-  shell_surface_role_class =
-    META_WAYLAND_SURFACE_ROLE_SHELL_SURFACE_CLASS (klass);
-  shell_surface_role_class->configure = wl_shell_surface_role_configure;
-  shell_surface_role_class->managed = wl_shell_surface_role_managed;
-  shell_surface_role_class->ping = wl_shell_surface_role_ping;
-  shell_surface_role_class->close = wl_shell_surface_role_close;
+  shell_surface_class = META_WAYLAND_SHELL_SURFACE_CLASS (klass);
+  shell_surface_class->configure = wl_shell_surface_role_configure;
+  shell_surface_class->managed = wl_shell_surface_role_managed;
+  shell_surface_class->ping = wl_shell_surface_role_ping;
+  shell_surface_class->close = wl_shell_surface_role_close;
 }
 
 void
diff --git a/src/wayland/meta-wayland-wl-shell.h b/src/wayland/meta-wayland-wl-shell.h
index a85d608c6..fab997285 100644
--- a/src/wayland/meta-wayland-wl-shell.h
+++ b/src/wayland/meta-wayland-wl-shell.h
@@ -26,7 +26,7 @@
 G_DECLARE_FINAL_TYPE (MetaWaylandWlShellSurface,
                       meta_wayland_wl_shell_surface,
                       META, WAYLAND_WL_SHELL_SURFACE,
-                      MetaWaylandSurfaceRoleShellSurface);
+                      MetaWaylandShellSurface);
 
 void meta_wayland_wl_shell_init (MetaWaylandCompositor *compositor);
 
diff --git a/src/wayland/meta-wayland-xdg-shell.c b/src/wayland/meta-wayland-xdg-shell.c
index 43b49231a..a553631a8 100644
--- a/src/wayland/meta-wayland-xdg-shell.c
+++ b/src/wayland/meta-wayland-xdg-shell.c
@@ -85,7 +85,7 @@ typedef struct _MetaWaylandXdgSurfacePrivate
 
 G_DEFINE_TYPE_WITH_PRIVATE (MetaWaylandXdgSurface,
                             meta_wayland_xdg_surface,
-                            META_TYPE_WAYLAND_SURFACE_ROLE_SHELL_SURFACE);
+                            META_TYPE_WAYLAND_SHELL_SURFACE);
 
 struct _MetaWaylandXdgToplevel
 {
@@ -655,15 +655,15 @@ xdg_toplevel_role_get_toplevel (MetaWaylandSurfaceRole *surface_role)
 }
 
 static void
-xdg_toplevel_role_configure (MetaWaylandSurfaceRoleShellSurface *shell_surface_role,
-                             int                                 new_x,
-                             int                                 new_y,
-                             int                                 new_width,
-                             int                                 new_height,
-                             MetaWaylandSerial                  *sent_serial)
+xdg_toplevel_role_configure (MetaWaylandShellSurface *shell_surface,
+                             int                      new_x,
+                             int                      new_y,
+                             int                      new_width,
+                             int                      new_height,
+                             MetaWaylandSerial       *sent_serial)
 {
   MetaWaylandXdgToplevel *xdg_toplevel =
-    META_WAYLAND_XDG_TOPLEVEL (shell_surface_role);
+    META_WAYLAND_XDG_TOPLEVEL (shell_surface);
   MetaWaylandXdgSurface *xdg_surface = META_WAYLAND_XDG_SURFACE (xdg_toplevel);
   MetaWaylandXdgSurfacePrivate *xdg_surface_priv =
     meta_wayland_xdg_surface_get_instance_private (xdg_surface);
@@ -680,16 +680,16 @@ xdg_toplevel_role_configure (MetaWaylandSurfaceRoleShellSurface *shell_surface_r
 }
 
 static void
-xdg_toplevel_role_managed (MetaWaylandSurfaceRoleShellSurface *shell_surface_role,
-                           MetaWindow                         *window)
+xdg_toplevel_role_managed (MetaWaylandShellSurface *shell_surface,
+                           MetaWindow              *window)
 {
 }
 
 static void
-xdg_toplevel_role_close (MetaWaylandSurfaceRoleShellSurface *shell_surface_role)
+xdg_toplevel_role_close (MetaWaylandShellSurface *shell_surface)
 {
   MetaWaylandXdgToplevel *xdg_toplevel =
-    META_WAYLAND_XDG_TOPLEVEL (shell_surface_role);
+    META_WAYLAND_XDG_TOPLEVEL (shell_surface);
 
   zxdg_toplevel_v6_send_close (xdg_toplevel->resource);
 }
@@ -737,7 +737,7 @@ meta_wayland_xdg_toplevel_class_init (MetaWaylandXdgToplevelClass *klass)
 {
   GObjectClass *object_class;
   MetaWaylandSurfaceRoleClass *surface_role_class;
-  MetaWaylandSurfaceRoleShellSurfaceClass *shell_surface_role_class;
+  MetaWaylandShellSurfaceClass *shell_surface_class;
   MetaWaylandXdgSurfaceClass *xdg_surface_class;
 
   object_class = G_OBJECT_CLASS (klass);
@@ -747,11 +747,10 @@ meta_wayland_xdg_toplevel_class_init (MetaWaylandXdgToplevelClass *klass)
   surface_role_class->commit = xdg_toplevel_role_commit;
   surface_role_class->get_toplevel = xdg_toplevel_role_get_toplevel;
 
-  shell_surface_role_class =
-    META_WAYLAND_SURFACE_ROLE_SHELL_SURFACE_CLASS (klass);
-  shell_surface_role_class->configure = xdg_toplevel_role_configure;
-  shell_surface_role_class->managed = xdg_toplevel_role_managed;
-  shell_surface_role_class->close = xdg_toplevel_role_close;
+  shell_surface_class = META_WAYLAND_SHELL_SURFACE_CLASS (klass);
+  shell_surface_class->configure = xdg_toplevel_role_configure;
+  shell_surface_class->managed = xdg_toplevel_role_managed;
+  shell_surface_class->close = xdg_toplevel_role_close;
 
   xdg_surface_class = META_WAYLAND_XDG_SURFACE_CLASS (klass);
   xdg_surface_class->shell_client_destroyed =
@@ -916,14 +915,14 @@ xdg_popup_role_get_toplevel (MetaWaylandSurfaceRole *surface_role)
 }
 
 static void
-xdg_popup_role_configure (MetaWaylandSurfaceRoleShellSurface *shell_surface_role,
-                          int                                 new_x,
-                          int                                 new_y,
-                          int                                 new_width,
-                          int                                 new_height,
-                          MetaWaylandSerial                  *sent_serial)
+xdg_popup_role_configure (MetaWaylandShellSurface *shell_surface,
+                          int                      new_x,
+                          int                      new_y,
+                          int                      new_width,
+                          int                      new_height,
+                          MetaWaylandSerial       *sent_serial)
 {
-  MetaWaylandXdgPopup *xdg_popup = META_WAYLAND_XDG_POPUP (shell_surface_role);
+  MetaWaylandXdgPopup *xdg_popup = META_WAYLAND_XDG_POPUP (shell_surface);
   MetaWaylandXdgSurface *xdg_surface = META_WAYLAND_XDG_SURFACE (xdg_popup);
   MetaWindow *parent_window = xdg_popup->parent_surface->window;
   int geometry_scale;
@@ -949,10 +948,10 @@ xdg_popup_role_configure (MetaWaylandSurfaceRoleShellSurface *shell_surface_role
 }
 
 static void
-xdg_popup_role_managed (MetaWaylandSurfaceRoleShellSurface *shell_surface_role,
-                        MetaWindow                         *window)
+xdg_popup_role_managed (MetaWaylandShellSurface *shell_surface,
+                        MetaWindow              *window)
 {
-  MetaWaylandXdgPopup *xdg_popup = META_WAYLAND_XDG_POPUP (shell_surface_role);
+  MetaWaylandXdgPopup *xdg_popup = META_WAYLAND_XDG_POPUP (shell_surface);
   MetaWaylandSurface *parent = xdg_popup->parent_surface;
 
   g_assert (parent);
@@ -1053,7 +1052,7 @@ meta_wayland_xdg_popup_class_init (MetaWaylandXdgPopupClass *klass)
 {
   GObjectClass *object_class;
   MetaWaylandSurfaceRoleClass *surface_role_class;
-  MetaWaylandSurfaceRoleShellSurfaceClass *shell_surface_role_class;
+  MetaWaylandShellSurfaceClass *shell_surface_class;
   MetaWaylandXdgSurfaceClass *xdg_surface_class;
 
   object_class = G_OBJECT_CLASS (klass);
@@ -1063,10 +1062,9 @@ meta_wayland_xdg_popup_class_init (MetaWaylandXdgPopupClass *klass)
   surface_role_class->commit = xdg_popup_role_commit;
   surface_role_class->get_toplevel = xdg_popup_role_get_toplevel;
 
-  shell_surface_role_class =
-    META_WAYLAND_SURFACE_ROLE_SHELL_SURFACE_CLASS (klass);
-  shell_surface_role_class->configure = xdg_popup_role_configure;
-  shell_surface_role_class->managed = xdg_popup_role_managed;
+  shell_surface_class = META_WAYLAND_SHELL_SURFACE_CLASS (klass);
+  shell_surface_class->configure = xdg_popup_role_configure;
+  shell_surface_class->managed = xdg_popup_role_managed;
 
   xdg_surface_class = META_WAYLAND_XDG_SURFACE_CLASS (klass);
   xdg_surface_class->shell_client_destroyed =
@@ -1324,11 +1322,10 @@ xdg_surface_role_assigned (MetaWaylandSurfaceRole *surface_role)
 }
 
 static void
-xdg_surface_role_ping (MetaWaylandSurfaceRoleShellSurface *shell_surface_role,
-                       uint32_t                            serial)
+xdg_surface_role_ping (MetaWaylandShellSurface *shell_surface,
+                       uint32_t                 serial)
 {
-  MetaWaylandXdgSurface *xdg_surface =
-    META_WAYLAND_XDG_SURFACE (shell_surface_role);
+  MetaWaylandXdgSurface *xdg_surface = META_WAYLAND_XDG_SURFACE (shell_surface);
   MetaWaylandXdgSurfacePrivate *priv =
     meta_wayland_xdg_surface_get_instance_private (xdg_surface);
 
@@ -1412,7 +1409,7 @@ meta_wayland_xdg_surface_class_init (MetaWaylandXdgSurfaceClass *klass)
 {
   GObjectClass *object_class;
   MetaWaylandSurfaceRoleClass *surface_role_class;
-  MetaWaylandSurfaceRoleShellSurfaceClass *shell_surface_role_class;
+  MetaWaylandShellSurfaceClass *shell_surface_class;
   GParamSpec *pspec;
 
   object_class = G_OBJECT_CLASS (klass);
@@ -1424,9 +1421,8 @@ meta_wayland_xdg_surface_class_init (MetaWaylandXdgSurfaceClass *klass)
   surface_role_class->commit = xdg_surface_role_commit;
   surface_role_class->assigned = xdg_surface_role_assigned;
 
-  shell_surface_role_class =
-    META_WAYLAND_SURFACE_ROLE_SHELL_SURFACE_CLASS (klass);
-  shell_surface_role_class->ping = xdg_surface_role_ping;
+  shell_surface_class = META_WAYLAND_SHELL_SURFACE_CLASS (klass);
+  shell_surface_class->ping = xdg_surface_role_ping;
 
   klass->shell_client_destroyed = xdg_surface_role_shell_client_destroyed;
 
diff --git a/src/wayland/meta-wayland-xdg-shell.h b/src/wayland/meta-wayland-xdg-shell.h
index 8249f0f53..4d56eb24a 100644
--- a/src/wayland/meta-wayland-xdg-shell.h
+++ b/src/wayland/meta-wayland-xdg-shell.h
@@ -26,11 +26,11 @@
 G_DECLARE_DERIVABLE_TYPE (MetaWaylandXdgSurface,
                           meta_wayland_xdg_surface,
                           META, WAYLAND_XDG_SURFACE,
-                          MetaWaylandSurfaceRoleShellSurface);
+                          MetaWaylandShellSurface)
 
 struct _MetaWaylandXdgSurfaceClass
 {
-  MetaWaylandSurfaceRoleShellSurfaceClass parent_class;
+  MetaWaylandShellSurfaceClass parent_class;
 
   void (*shell_client_destroyed) (MetaWaylandXdgSurface *xdg_surface);
 };


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