mirror of
https://github.com/brl/mutter.git
synced 2024-11-28 11:00:54 -05:00
window-actor: add new signal "effects-completed"
When using plugins, the effects will affect the MetaWindowActor size and position. Add a new signal "effects-completed" wired to the corresponding MetaWindowActor which is emitted when all effects are completed so that derived objects can be notified when all effects are completed and use the actual size and position. Closes: https://gitlab.gnome.org/GNOME/mutter/issues/104
This commit is contained in:
parent
deda7a5235
commit
85bbd82ae8
@ -58,5 +58,6 @@ void meta_window_actor_effect_completed (MetaWindowActor *actor,
|
|||||||
|
|
||||||
MetaSurfaceActor *meta_window_actor_get_surface (MetaWindowActor *self);
|
MetaSurfaceActor *meta_window_actor_get_surface (MetaWindowActor *self);
|
||||||
void meta_window_actor_update_surface (MetaWindowActor *self);
|
void meta_window_actor_update_surface (MetaWindowActor *self);
|
||||||
|
MetaWindowActor *meta_window_actor_from_window (MetaWindow *window);
|
||||||
|
|
||||||
#endif /* META_WINDOW_ACTOR_PRIVATE_H */
|
#endif /* META_WINDOW_ACTOR_PRIVATE_H */
|
||||||
|
@ -142,6 +142,8 @@ struct _FrameData
|
|||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
FIRST_FRAME,
|
FIRST_FRAME,
|
||||||
|
EFFECTS_COMPLETED,
|
||||||
|
|
||||||
LAST_SIGNAL
|
LAST_SIGNAL
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -238,6 +240,21 @@ meta_window_actor_class_init (MetaWindowActorClass *klass)
|
|||||||
NULL, NULL, NULL,
|
NULL, NULL, NULL,
|
||||||
G_TYPE_NONE, 0);
|
G_TYPE_NONE, 0);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MetaWindowActor::effects-completed:
|
||||||
|
* @actor: the #MetaWindowActor instance
|
||||||
|
*
|
||||||
|
* The ::effects-completed signal will be emitted once all pending compositor
|
||||||
|
* effects are completed.
|
||||||
|
*/
|
||||||
|
signals[EFFECTS_COMPLETED] =
|
||||||
|
g_signal_new ("effects-completed",
|
||||||
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
|
G_SIGNAL_RUN_LAST,
|
||||||
|
0,
|
||||||
|
NULL, NULL, NULL,
|
||||||
|
G_TYPE_NONE, 0);
|
||||||
|
|
||||||
pspec = g_param_spec_object ("meta-window",
|
pspec = g_param_spec_object ("meta-window",
|
||||||
"MetaWindow",
|
"MetaWindow",
|
||||||
"The displayed MetaWindow",
|
"The displayed MetaWindow",
|
||||||
@ -1131,6 +1148,7 @@ meta_window_actor_after_effects (MetaWindowActor *self)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_signal_emit (self, signals[EFFECTS_COMPLETED], 0);
|
||||||
meta_window_actor_sync_visibility (self);
|
meta_window_actor_sync_visibility (self);
|
||||||
meta_window_actor_sync_actor_geometry (self, FALSE);
|
meta_window_actor_sync_actor_geometry (self, FALSE);
|
||||||
}
|
}
|
||||||
@ -2157,3 +2175,9 @@ meta_window_actor_sync_updates_frozen (MetaWindowActor *self)
|
|||||||
|
|
||||||
meta_window_actor_set_updates_frozen (self, meta_window_updates_are_frozen (window));
|
meta_window_actor_set_updates_frozen (self, meta_window_updates_are_frozen (window));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MetaWindowActor *
|
||||||
|
meta_window_actor_from_window (MetaWindow *window)
|
||||||
|
{
|
||||||
|
return META_WINDOW_ACTOR (meta_window_get_compositor_private (window));
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user