summaryrefslogtreecommitdiff
path: root/libgdm
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2014-06-05 17:01:48 -0400
committerRay Strode <rstrode@redhat.com>2014-06-05 17:19:33 -0400
commite24484f72bdf1d7c96131c6b7bae6409fabed210 (patch)
tree97054c10d0a1afb6cdce60300e8accc07997b4ea /libgdm
parentef6954833cf43bef8306823d7fcfb6a04b903ad7 (diff)
downloadgdm-e24484f72bdf1d7c96131c6b7bae6409fabed210.tar.gz
manager: close up timed login race
Previously we would emit the timed-login-requested signal after the client connects, which might be before it was listening for the signal. Now we only emit the signal in direct response to a GetTimedLoginDetails call, which we make implicitly when the appropiate proxy interface is set up. https://bugzilla.gnome.org/show_bug.cgi?id=680348
Diffstat (limited to 'libgdm')
-rw-r--r--libgdm/gdm-client.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/libgdm/gdm-client.c b/libgdm/gdm-client.c
index 4542c3ed..3cd298ee 100644
--- a/libgdm/gdm-client.c
+++ b/libgdm/gdm-client.c
@@ -794,6 +794,26 @@ gdm_client_get_user_verifier_finish (GdmClient *client,
}
static void
+on_timed_login_details_got (GdmGreeter *greeter,
+ GAsyncResult *result)
+{
+ gdm_greeter_call_get_timed_login_details_finish (greeter, NULL, NULL, NULL, result, NULL);
+}
+
+static void
+query_for_timed_login_requested_signal (GdmGreeter *greeter)
+{
+ /* This just makes sure a timed-login-requested signal gets fired
+ * off if appropriate.
+ */
+ gdm_greeter_call_get_timed_login_details (greeter,
+ NULL,
+ (GAsyncReadyCallback)
+ on_timed_login_details_got,
+ NULL);
+}
+
+static void
on_greeter_proxy_created (GObject *source,
GAsyncResult *result,
GSimpleAsyncResult *operation_result)
@@ -813,6 +833,8 @@ on_greeter_proxy_created (GObject *source,
(GDestroyNotify)
g_object_unref);
g_simple_async_result_complete_in_idle (operation_result);
+
+ query_for_timed_login_requested_signal (greeter);
}
static void
@@ -980,6 +1002,8 @@ gdm_client_get_greeter_sync (GdmClient *client,
(GWeakNotify)
g_clear_object,
&client->priv->connection);
+
+ query_for_timed_login_requested_signal (client->priv->greeter);
}
return client->priv->greeter;