[mutter] MetaWaylandSurface: Add 'configure' signal



commit cfb3d10e1b2d067cd78b245f04f2c443e724c188
Author: Jonas Ådahl <jadahl gmail com>
Date:   Tue Jun 28 14:56:20 2016 +0800

    MetaWaylandSurface: Add 'configure' signal
    
    Emit a 'configure' signal before configuring the role. This will enable
    extensions to send its own configure events before the role is
    configured.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=769936

 src/wayland/meta-wayland-surface.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c
index 1a865e1..eaa63d3 100644
--- a/src/wayland/meta-wayland-surface.c
+++ b/src/wayland/meta-wayland-surface.c
@@ -128,6 +128,7 @@ G_DEFINE_TYPE (MetaWaylandSurfaceRoleDND,
 enum {
   SURFACE_DESTROY,
   SURFACE_UNMAPPED,
+  SURFACE_CONFIGURE,
   N_SURFACE_SIGNALS
 };
 
@@ -1583,6 +1584,8 @@ meta_wayland_surface_configure_notify (MetaWaylandSurface *surface,
   MetaWaylandSurfaceRoleShellSurface *shell_surface_role =
     META_WAYLAND_SURFACE_ROLE_SHELL_SURFACE (surface->role);
 
+  g_signal_emit (surface, surface_signals[SURFACE_CONFIGURE], 0);
+
   meta_wayland_surface_role_shell_surface_configure (shell_surface_role,
                                                      new_width, new_height,
                                                      sent_serial);
@@ -1783,6 +1786,14 @@ meta_wayland_surface_class_init (MetaWaylandSurfaceClass *klass)
                   0, NULL, NULL,
                   g_cclosure_marshal_VOID__VOID,
                   G_TYPE_NONE, 0);
+
+  surface_signals[SURFACE_CONFIGURE] =
+    g_signal_new ("configure",
+                  G_TYPE_FROM_CLASS (object_class),
+                  G_SIGNAL_RUN_LAST,
+                  0, NULL, NULL,
+                  g_cclosure_marshal_VOID__VOID,
+                  G_TYPE_NONE, 0);
 }
 
 static void


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