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
This commit is contained in:
Jonas Ådahl 2016-06-28 14:56:20 +08:00
parent 3a75e55cd8
commit cfb3d10e1b

View File

@ -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