summaryrefslogtreecommitdiff
path: root/mate-session/gsm-manager.c
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-11-07 13:27:23 +0100
committerinfirit <[email protected]>2014-11-07 14:31:52 +0100
commit97a9f2c181817b09edd0783ed808dbd1ee49b36a (patch)
tree5a00a504d94b363d5ffd57d5777464f21312e9b3 /mate-session/gsm-manager.c
parente98d698c4899ac91e2370252ab67ce91871a72a5 (diff)
downloadmate-session-manager-97a9f2c181817b09edd0783ed808dbd1ee49b36a.tar.bz2
mate-session-manager-97a9f2c181817b09edd0783ed808dbd1ee49b36a.tar.xz
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. Based on gnome-session commit: b59d358796343f81b31d4a398998faedd20b8f4b From: Matthias Clasen <[email protected]> Gnome bug: https://bugzilla.gnome.org/show_bug.cgi?id=636229
Diffstat (limited to 'mate-session/gsm-manager.c')
-rw-r--r--mate-session/gsm-manager.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/mate-session/gsm-manager.c b/mate-session/gsm-manager.c
index e814323..2a4d140 100644
--- a/mate-session/gsm-manager.c
+++ b/mate-session/gsm-manager.c
@@ -3942,3 +3942,14 @@ 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;
+}