From: Dana Jansens Date: Mon, 3 Mar 2008 12:46:24 +0000 (-0500) Subject: don't save our state for SmSaveGlobal session saves, just Local ones X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=d394d8c613b8b85cd3ee92b6114716e57f8d03ce;p=chaz%2Fopenbox don't save our state for SmSaveGlobal session saves, just Local ones --- diff --git a/openbox/session.c b/openbox/session.c index 82e292b3..ab6864b3 100644 --- a/openbox/session.c +++ b/openbox/session.c @@ -404,7 +404,22 @@ static void sm_save_yourself(SmcConn conn, SmPointer data, gint save_type, ObSMSaveData *savedata = NULL; gchar *vendor; - ob_debug_type(OB_DEBUG_SM, "Session save requested\n"); +#ifdef DEBUG + { + const gchar *sname = + (save_type == SmSaveLocal ? "SmSaveLocal" : + (save_type == SmSaveGlobal ? "SmSaveGlobal" : + (save_type == SmSaveBoth ? "SmSaveBoth" : "INVALID!!"))); + ob_debug_type(OB_DEBUG_SM, "Session save requested, type %s\n", sname); + } +#endif + + if (save_type == SmSaveGlobal) { + /* we have no data to save. we only store state to get back to where + we were, we don't keep open writable files or anything */ + SmcSaveYourselfDone(conn, TRUE); + return; + } vendor = SmcVendor(sm_conn); ob_debug_type(OB_DEBUG_SM, "Session manager's vendor: %s\n", vendor);