all: Add names to timeouts

Add names to every timeout we setup, so it's easier to track their
usage, and debug possible misbehaviour.

https://bugzilla.gnome.org/show_bug.cgi?id=710651
This commit is contained in:
Bastien Nocera
2013-10-22 15:43:43 +02:00
parent dcc0fd222e
commit 438cd857c4
38 changed files with 141 additions and 32 deletions

View File

@ -215,8 +215,10 @@ startup_timeout (void *data)
if (std->contexts == NULL)
std->timeout_id = 0;
else
else {
std->timeout_id = g_timeout_add_seconds ((min_timeout + 500)/1000, startup_timeout, std);
g_source_set_name_by_id (std->timeout_id, "[gtk+] startup_timeout");
}
/* always remove this one, but we may have reinstalled another one. */
return G_SOURCE_REMOVE;
@ -249,9 +251,11 @@ add_startup_timeout (GdkScreen *screen,
data->contexts = g_slist_prepend (data->contexts, sn_data);
if (data->timeout_id == 0)
if (data->timeout_id == 0) {
data->timeout_id = g_timeout_add_seconds (STARTUP_TIMEOUT_LENGTH_SECONDS,
startup_timeout, data);
g_source_set_name_by_id (data->timeout_id, "[gtk+] startup_timeout");
}
}