mirror of
https://github.com/brl/mutter.git
synced 2025-01-22 17:38:56 +00:00
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
This commit is contained in:
parent
4bacb3621b
commit
0cf98c5641
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user