[gdm/wip/wayland: 5/10] daemon: add new gdm_session_is_running method



commit cd1b31a84656ad41e237543e73cfac58270e6531
Author: Ray Strode <rstrode redhat com>
Date:   Mon Sep 16 23:42:51 2013 -0400

    daemon: add new gdm_session_is_running method
    
    GdmSession emits when a session is started or stopped, but doesn't
    let a caller query if a session is on-going.
    
    This commit adds API for that.

 daemon/gdm-session.c |    6 ++++++
 daemon/gdm-session.h |    1 +
 2 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
index d74bed6..f8f0967 100644
--- a/daemon/gdm-session.c
+++ b/daemon/gdm-session.c
@@ -2591,6 +2591,12 @@ gdm_session_request_timed_login (GdmSession *self,
 }
 
 gboolean
+gdm_session_is_running (GdmSession *self)
+{
+        return self->priv->session_pid > 0;
+}
+
+gboolean
 gdm_session_client_is_connected (GdmSession *self)
 {
         g_return_val_if_fail (GDM_IS_SESSION (self), FALSE);
diff --git a/daemon/gdm-session.h b/daemon/gdm-session.h
index 2511eca..4faf5fc 100644
--- a/daemon/gdm-session.h
+++ b/daemon/gdm-session.h
@@ -161,6 +161,7 @@ void              gdm_session_request_timed_login         (GdmSession *session,
                                                            const char *username,
                                                            int         delay);
 gboolean          gdm_session_client_is_connected         (GdmSession *session);
+gboolean          gdm_session_is_running                  (GdmSession *session);
 
 G_END_DECLS
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]