X-Git-Url: http://git.openbox.org/?p=mikachu%2Fopenbox.git;a=blobdiff_plain;f=openbox%2Fsession.c;h=3cf8fbe246171f6eb720722f599202150db8489d;hp=99d66221ce4a7f3e5993642c223884716e6a4472;hb=37705f444eecabb2e5bd31e92bc8b82ae9b8b596;hpb=a47d0a53652a96ca1df96fc9268757df1431ae55 diff --git a/openbox/session.c b/openbox/session.c index 99d6622..3cf8fbe 100644 --- a/openbox/session.c +++ b/openbox/session.c @@ -33,6 +33,7 @@ GSList *session_desktop_names = NULL; 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) {} #else #include "debug.h" @@ -813,4 +814,20 @@ static void session_load_file(const gchar *path) obt_parse_instance_unref(i); } +void session_request_logout(gboolean silent) +{ + if (sm_conn) { + SmcRequestSaveYourself(sm_conn, + SmSaveBoth, + TRUE, /* logout */ + (silent ? + SmInteractStyleNone : SmInteractStyleAny), + TRUE, /* if false, with GSM, it shows the old + logout prompt */ + TRUE); /* global */ + } + else + g_message(_("Not connected to a session manager")); +} + #endif