mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 03:22:04 +00:00
core: Emit MetaStartupNotification::changed on sequence completion
This way handlers that want to know the get_complete() status will be able to do so without further delays. Closes: https://gitlab.gnome.org/GNOME/mutter/issues/541
This commit is contained in:
parent
38ff01d6d0
commit
3de6f7ebfe
@ -424,12 +424,22 @@ meta_startup_sequence_get_wmclass (MetaStartupSequence *seq)
|
||||
return priv->wmclass;
|
||||
}
|
||||
|
||||
static void
|
||||
on_sequence_completed (MetaStartupSequence *seq,
|
||||
MetaStartupNotification *sn)
|
||||
{
|
||||
meta_startup_notification_update_feedback (sn);
|
||||
g_signal_emit (sn, sn_signals[CHANGED], 0, seq);
|
||||
}
|
||||
|
||||
void
|
||||
meta_startup_notification_add_sequence (MetaStartupNotification *sn,
|
||||
MetaStartupSequence *seq)
|
||||
{
|
||||
sn->startup_sequences = g_slist_prepend (sn->startup_sequences,
|
||||
g_object_ref (seq));
|
||||
g_signal_connect (seq, "complete",
|
||||
G_CALLBACK (on_sequence_completed), sn);
|
||||
|
||||
meta_startup_notification_ensure_timeout (sn);
|
||||
meta_startup_notification_update_feedback (sn);
|
||||
@ -519,6 +529,8 @@ meta_startup_notification_remove_sequence (MetaStartupNotification *sn,
|
||||
sn->startup_sequences = g_slist_remove (sn->startup_sequences, seq);
|
||||
meta_startup_notification_update_feedback (sn);
|
||||
|
||||
g_signal_handlers_disconnect_by_func (seq, on_sequence_completed, sn);
|
||||
|
||||
if (sn->startup_sequences == NULL &&
|
||||
sn->startup_sequence_timeout != 0)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user