Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions 0009-Keep-state-files-only-when-SaveOnExit-is-true.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
From 7d643cffc1df6ce61abbbf5f6dec3f09aadc7afd Mon Sep 17 00:00:00 2001
From: Yassin Ahmed <eng.yassin.elbedwihy@gmail.com>
Date: Thu, 26 Feb 2026 10:31:29 -0500
Subject: [PATCH] Keep state files only when SaveOnExit is true

---
src/session.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/session.c b/src/session.c
index b9b202572..aa752d5d4 100644
--- a/src/session.c
+++ b/src/session.c
@@ -731,13 +731,18 @@ sessionSavePhase2 (XfceSMClient *session,
DisplayInfo *display_info)
{
const gchar *filename;
+ XfconfChannel *session_channel;
+ gboolean save_on_exit;

g_return_if_fail (XFCE_IS_SM_CLIENT (session));
g_return_if_fail (session == display_info->session);

+ session_channel = xfconf_channel_get("xfce4-session");
+ save_on_exit = xfconf_channel_get_bool(session_channel, "/general/SaveOnExit", TRUE);
+
filename = xfce_sm_client_get_state_file (display_info->session);
DBG ("Saving session to \"%s\"", filename);
- if (filename)
+ if (filename && save_on_exit)
{
sessionSaveWindowStates (display_info, filename);
}
--
2.53.0

1 change: 1 addition & 0 deletions series-debian.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
0006-Qubes-decoration-title-colors.patch
0007-Colors-overhaul.patch
0008-Fail-safe-when-displaying-colors.patch
0009-Keep-state-files-only-when-SaveOnExit-is-true.patch
0009-XXX-Reduce-error-trap-leak.patch
1 change: 1 addition & 0 deletions xfwm4.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Patch4: 0005-Qubes-decoration-handle-guivm-windows-prefix.patch
Patch5: 0006-Qubes-decoration-title-colors.patch
Patch6: 0007-Colors-overhaul.patch
Patch7: 0008-Fail-safe-when-displaying-colors.patch
Patch8: 0009-Keep-state-files-only-when-SaveOnExit-is-true.patch

BuildRequires: make
BuildRequires: gcc-c++
Expand Down