[Xfce4-commits] <thunar:master> Remove session file if there are no windows (bug #9519).

Nick Schermer noreply at xfce.org
Sun Dec 2 21:34:01 CET 2012


Updating branch refs/heads/master
         to 7e317eb0b6036698a0bb2e36ac16776647f14726 (commit)
       from e2f3815ed0e40b423d2b4f9fdee31a440fe14614 (commit)

commit 7e317eb0b6036698a0bb2e36ac16776647f14726
Author: Nick Schermer <nick at xfce.org>
Date:   Sun Dec 2 20:19:38 2012 +0100

    Remove session file if there are no windows (bug #9519).

 thunar/thunar-session-client.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/thunar/thunar-session-client.c b/thunar/thunar-session-client.c
index 965f6a0..46a944d 100644
--- a/thunar/thunar-session-client.c
+++ b/thunar/thunar-session-client.c
@@ -36,6 +36,8 @@
 #include <X11/SM/SMlib.h>
 #endif
 
+#include <glib/gstdio.h>
+
 #include <thunar/thunar-application.h>
 #include <thunar/thunar-ice.h>
 #include <thunar/thunar-private.h>
@@ -411,6 +413,11 @@ thunar_session_client_save_yourself (SmcConn              connection,
 
           g_list_free (windows);
         }
+      else
+        {
+          /* no windows, remove the file */
+          g_unlink (session_client->path);
+        }
 
       g_object_unref (G_OBJECT (application));
     }


More information about the Xfce4-commits mailing list