mirror of
https://github.com/brl/mutter.git
synced 2024-11-24 09:00:42 -05:00
startup-notification: Fix naming of handle ID
It was named the same as the callback function itself, which was confusing. ADd the `_id` suffix, which is the convention. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2081>
This commit is contained in:
parent
734ae26ff7
commit
a2cf75ccd5
@ -90,7 +90,7 @@ struct _MetaStartupNotification
|
|||||||
|
|
||||||
|
|
||||||
GSList *startup_sequences;
|
GSList *startup_sequences;
|
||||||
guint startup_sequence_timeout;
|
guint startup_sequence_timeout_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@ -513,7 +513,7 @@ startup_sequence_timeout (void *data)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* remove */
|
/* remove */
|
||||||
sn->startup_sequence_timeout = 0;
|
sn->startup_sequence_timeout_id = 0;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -521,16 +521,15 @@ startup_sequence_timeout (void *data)
|
|||||||
static void
|
static void
|
||||||
meta_startup_notification_ensure_timeout (MetaStartupNotification *sn)
|
meta_startup_notification_ensure_timeout (MetaStartupNotification *sn)
|
||||||
{
|
{
|
||||||
if (sn->startup_sequence_timeout != 0)
|
if (sn->startup_sequence_timeout_id != 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* our timeout just polls every second, instead of bothering
|
/* our timeout just polls every second, instead of bothering
|
||||||
* to compute exactly when we may next time out
|
* to compute exactly when we may next time out
|
||||||
*/
|
*/
|
||||||
sn->startup_sequence_timeout = g_timeout_add_seconds (1,
|
sn->startup_sequence_timeout_id =
|
||||||
startup_sequence_timeout,
|
g_timeout_add_seconds (1, startup_sequence_timeout, sn);
|
||||||
sn);
|
g_source_set_name_by_id (sn->startup_sequence_timeout_id,
|
||||||
g_source_set_name_by_id (sn->startup_sequence_timeout,
|
|
||||||
"[mutter] startup_sequence_timeout");
|
"[mutter] startup_sequence_timeout");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -544,7 +543,7 @@ meta_startup_notification_remove_sequence (MetaStartupNotification *sn,
|
|||||||
g_signal_handlers_disconnect_by_func (seq, on_sequence_completed, sn);
|
g_signal_handlers_disconnect_by_func (seq, on_sequence_completed, sn);
|
||||||
|
|
||||||
if (sn->startup_sequences == NULL)
|
if (sn->startup_sequences == NULL)
|
||||||
g_clear_handle_id (&sn->startup_sequence_timeout, g_source_remove);
|
g_clear_handle_id (&sn->startup_sequence_timeout_id, g_source_remove);
|
||||||
|
|
||||||
g_signal_emit (sn, sn_signals[CHANGED], 0, seq);
|
g_signal_emit (sn, sn_signals[CHANGED], 0, seq);
|
||||||
g_object_unref (seq);
|
g_object_unref (seq);
|
||||||
@ -580,7 +579,7 @@ meta_startup_notification_finalize (GObject *object)
|
|||||||
{
|
{
|
||||||
MetaStartupNotification *sn = META_STARTUP_NOTIFICATION (object);
|
MetaStartupNotification *sn = META_STARTUP_NOTIFICATION (object);
|
||||||
|
|
||||||
g_clear_handle_id (&sn->startup_sequence_timeout, g_source_remove);
|
g_clear_handle_id (&sn->startup_sequence_timeout_id, g_source_remove);
|
||||||
|
|
||||||
g_slist_free_full (sn->startup_sequences, g_object_unref);
|
g_slist_free_full (sn->startup_sequences, g_object_unref);
|
||||||
sn->startup_sequences = NULL;
|
sn->startup_sequences = NULL;
|
||||||
@ -634,7 +633,7 @@ meta_startup_notification_constructed (GObject *object)
|
|||||||
g_assert (sn->display != NULL);
|
g_assert (sn->display != NULL);
|
||||||
|
|
||||||
sn->startup_sequences = NULL;
|
sn->startup_sequences = NULL;
|
||||||
sn->startup_sequence_timeout = 0;
|
sn->startup_sequence_timeout_id = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user