From 7f36e21ea9d86df5e6fa62d2888891ed957c4639 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Tue, 24 Nov 2009 19:36:18 -0500 Subject: Combine the Exit and SessionLogout actions Just "do the right thing" based on if you are connected to a session manager or not. --- openbox/session.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'openbox/session.c') 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() { -- cgit v1.2.3