summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2011-04-22 13:29:28 +0200
committerDanny Baumann <dannybaumann@web.de>2011-04-22 13:29:28 +0200
commitdd684645232ba845726fcafcdd1a9dbb43f170ff (patch)
tree3e68f1fcd3769ee6a5f155b62c53ea016297e02f
parentefd6cebe732a6f70fbe636307bcd54c55d6351f6 (diff)
downloadsession-dd684645232ba845726fcafcdd1a9dbb43f170ff.tar.gz
session-dd684645232ba845726fcafcdd1a9dbb43f170ff.tar.bz2
Ignore global saves.
They're only used by session managers to trigger e.g. word processor save confirmation dialogs on shutdown, not to actually save.
-rw-r--r--session.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/session.c b/session.c
index 065613b..6a5f1a6 100644
--- a/session.c
+++ b/session.c
@@ -887,11 +887,23 @@ sessionSessionEvent (CompCore *c,
SmInteractStyleNone);
fast = getBoolOptionNamed (arguments, nArguments, "fast", FALSE);
- /* ignore saveYourself after registering for the first time
- (SM specification 7.2) */
- saveSession = shutdown || fast ||
- (saveType != SmSaveLocal) ||
- (interactStyle != SmInteractStyleNone);
+ if (saveType == SmSaveGlobal)
+ {
+ /* ignore global saves, which are used only to make e.g. word
+ processors show a 'do you want to save' dialog on session
+ shutdown */
+ saveSession = FALSE;
+ } else if (shutdown && fast && saveType == SmSaveLocal &&
+ interactStyle == SmInteractStyleNone)
+ {
+ /* ignore saveYourself after registering for the first time
+ (SM specification 7.2) */
+ saveSession = FALSE;
+ }
+ else
+ {
+ saveSession = TRUE;
+ }
clientId = getSessionClientId (CompSessionClientId);