summaryrefslogtreecommitdiff
path: root/gnome-session/gsm-manager.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2011-08-27 00:39:12 -0400
committerMatthias Clasen <mclasen@redhat.com>2011-08-27 00:41:10 -0400
commitb59d358796343f81b31d4a398998faedd20b8f4b (patch)
tree170311d1a1f9b357715c4a73df001faeddfcf170 /gnome-session/gsm-manager.c
parent592963b43389265af273a8928badd10f75ced492 (diff)
downloadgnome-session-b59d358796343f81b31d4a398998faedd20b8f4b.tar.gz
Add an IsSessionRunning method
This gives clients who missed the SessionRunning signal a chance to find out if the session has entered the running phase, and lets us avoid race conditions. Patch by Dan Williams, https://bugzilla.gnome.org/show_bug.cgi?id=636229
Diffstat (limited to 'gnome-session/gsm-manager.c')
-rw-r--r--gnome-session/gsm-manager.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gnome-session/gsm-manager.c b/gnome-session/gsm-manager.c
index 7cba07df..12699a9c 100644
--- a/gnome-session/gsm-manager.c
+++ b/gnome-session/gsm-manager.c
@@ -3979,3 +3979,15 @@ gsm_manager_add_autostart_apps_from_dir (GsmManager *manager,
return TRUE;
}
+
+gboolean
+gsm_manager_is_session_running (GsmManager *manager,
+ gboolean *running,
+ GError **error)
+{
+ g_return_val_if_fail (GSM_IS_MANAGER (manager), FALSE);
+
+ *running = (manager->priv->phase == GSM_MANAGER_PHASE_RUNNING);
+ return TRUE;
+}
+