summaryrefslogtreecommitdiff
path: root/openbox/session.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2009-11-24 19:36:18 -0500
committerDana Jansens <danakj@orodu.net>2009-11-24 19:36:18 -0500
commit7f36e21ea9d86df5e6fa62d2888891ed957c4639 (patch)
tree7835746fdab5d9e95fc6ca0d1b51169579baa3ae /openbox/session.c
parentada5de28f71efaa5584709673cc49cdb3b703299 (diff)
Combine the Exit and SessionLogout actions
Just "do the right thing" based on if you are connected to a session manager or not.
Diffstat (limited to 'openbox/session.c')
-rw-r--r--openbox/session.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/openbox/session.c b/openbox/session.c
index 811592ec..14018478 100644
--- a/openbox/session.c
+++ b/openbox/session.c
@@ -34,6 +34,7 @@ void session_startup(gint argc, gchar **argv) {}
void session_shutdown(gboolean permanent) {}
GList* session_state_find(struct _ObClient *c) { return NULL; }
void session_request_logout(gboolean silent) {}
+gboolean session_connected(void) { return FALSE; }
#else
#include "debug.h"
@@ -155,6 +156,11 @@ void session_shutdown(gboolean permanent)
}
}
+gboolean session_connected(void)
+{
+ return !!sm_conn;
+}
+
/*! Connect to the session manager and set up our callback functions */
static gboolean session_connect()
{