diff options
Diffstat (limited to 'mate-session')
-rw-r--r-- | mate-session/gsm-manager.c | 11 | ||||
-rw-r--r-- | mate-session/gsm-manager.h | 4 | ||||
-rw-r--r-- | mate-session/org.mate.SessionManager.xml | 16 |
3 files changed, 30 insertions, 1 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; +} diff --git a/mate-session/gsm-manager.h b/mate-session/gsm-manager.h index 035d11b..4422f59 100644 --- a/mate-session/gsm-manager.h +++ b/mate-session/gsm-manager.h @@ -190,6 +190,10 @@ gboolean gsm_manager_is_autostart_condition_handled (GsmManager * gboolean gsm_manager_set_phase (GsmManager *manager, GsmManagerPhase phase); +gboolean gsm_manager_is_session_running (GsmManager *manager, + gboolean *running, + GError **error); + #ifdef __cplusplus } #endif diff --git a/mate-session/org.mate.SessionManager.xml b/mate-session/org.mate.SessionManager.xml index 1569cf7..9b6f452 100644 --- a/mate-session/org.mate.SessionManager.xml +++ b/mate-session/org.mate.SessionManager.xml @@ -316,7 +316,21 @@ </doc:description> </doc:doc> </method> - + + <method name="IsSessionRunning"> + <arg name="running" direction="out" type="b"> + <doc:doc> + <doc:summary>True if the session has entered the Running phase, false otherwise</doc:summary> + </doc:doc> + </arg> + <doc:doc> + <doc:description> + <doc:para>Allows the caller to determine whether the session manager + has entered the Running phase, in case the client missed the + SessionRunning signal.</doc:para> + </doc:description> + </doc:doc> + </method> <!-- Signals --> <signal name="ClientAdded"> |