]> Dogcows Code - chaz/openbox/commitdiff
don't save our state for SmSaveGlobal session saves, just Local ones
authorDana Jansens <danakj@orodu.net>
Mon, 3 Mar 2008 12:46:24 +0000 (07:46 -0500)
committerMikael Magnusson <mikachu@comhem.se>
Mon, 3 Mar 2008 16:00:17 +0000 (17:00 +0100)
openbox/session.c

index 82e292b38a14e3df6405dcb0d37271257f0a9893..ab6864b3929ef75cccfe1801b453181c41ad69ce 100644 (file)
@@ -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);
This page took 0.02544 seconds and 4 git commands to generate.