summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2018-10-24 11:34:18 +0200
committerJonas Ådahl <jadahl@gmail.com>2019-12-09 10:09:40 +0100
commit0cf98c564195fc240c94badc3a4457f674f70918 (patch)
treea6e26abc20308897a6d344c02be805b04e549ef6
parent4bacb3621bc5bb1c788ff759f2b86b4d42a5271a (diff)
downloadmutter-0cf98c564195fc240c94badc3a4457f674f70918.tar.gz
wayland/surface: Emit signal before applying state
Will be used to invalidate depending state that should be updated as part of a surface state being applied. https://gitlab.gnome.org/GNOME/mutter/merge_requests/907
-rw-r--r--src/wayland/meta-wayland-surface.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c
index 4122acc11..841a2d33d 100644
--- a/src/wayland/meta-wayland-surface.c
+++ b/src/wayland/meta-wayland-surface.c
@@ -96,6 +96,7 @@ enum
SURFACE_SHORTCUTS_INHIBITED,
SURFACE_SHORTCUTS_RESTORED,
SURFACE_GEOMETRY_CHANGED,
+ SURFACE_PRE_STATE_APPLIED,
N_SURFACE_SIGNALS
};
@@ -650,6 +651,8 @@ meta_wayland_surface_apply_pending_state (MetaWaylandSurface *surface,
{
gboolean had_damage = FALSE;
+ g_signal_emit (surface, surface_signals[SURFACE_PRE_STATE_APPLIED], 0);
+
if (surface->role)
{
meta_wayland_surface_role_pre_commit (surface->role, pending);
@@ -1718,6 +1721,13 @@ meta_wayland_surface_class_init (MetaWaylandSurfaceClass *klass)
0, NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
+ surface_signals[SURFACE_PRE_STATE_APPLIED] =
+ g_signal_new ("pre-state-applied",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST,
+ 0, NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
}
static void