[gdm/wip/wayland-rebase: 7/15] daemon: add new gdm_session_is_running method
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm/wip/wayland-rebase: 7/15] daemon: add new gdm_session_is_running method
- Date: Thu, 13 Feb 2014 20:40:12 +0000 (UTC)
commit 6b22b297febfb505b40902ab85f1312e4bb975fd
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 4668f72..7beb8a3 100644
--- a/daemon/gdm-session.c
+++ b/daemon/gdm-session.c
@@ -2568,6 +2568,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 9b17dc1..33ff43a 100644
--- a/daemon/gdm-session.h
+++ b/daemon/gdm-session.h
@@ -160,6 +160,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]