[gdm/wip/wayland-rebase: 15/20] daemon: add new gdm_session_is_running method



commit 4af032116febf270481b1ea15ec8198084625ffb
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 c16f0e7..f48677a 100644
--- a/daemon/gdm-session.c
+++ b/daemon/gdm-session.c
@@ -2552,6 +2552,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 8e6e4e3..944cb10 100644
--- a/daemon/gdm-session.h
+++ b/daemon/gdm-session.h
@@ -159,6 +159,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]