[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdebase/ksmserver
From:       Oswald Buddenhagen <ossi () kde ! org>
Date:       2005-02-04 23:36:57
Message-ID: 20050204233657.0AAEB1BBDE () office ! kde ! org
[Download RAW message or body]

CVS commit by ossi: 

don't shutdown if an unavailable shutdown type without confirmation was
requested.


  M +7 -3      server.cpp   1.138


--- kdebase/ksmserver/server.cpp  #1.137:1.138
@@ -937,5 +937,4 @@ void KSMServer::shutdown( KApplication::
     if ( state != Idle || dialogActive )
         return;
-    dialogActive = true;
 
     KConfig *config = KGlobal::config();
@@ -951,7 +950,11 @@ void KSMServer::shutdown( KApplication::
     if (config->readBoolEntry( "offerShutdown", true ) && DM().canShutdown())
         maysd = true;
-    if (!maysd)
+    if (!maysd) {
+        if (sdtype != KApplication::ShutdownTypeNone &&
+            sdtype != KApplication::ShutdownTypeDefault &&
+            logoutConfirmed)
+            return; /* unsupported fast shutdown */
         sdtype = KApplication::ShutdownTypeNone;
-    else if (sdtype == KApplication::ShutdownTypeDefault)
+    } else if (sdtype == KApplication::ShutdownTypeDefault)
         sdtype = (KApplication::ShutdownType)
                  config->readNumEntry( "shutdownType", (int)KApplication::ShutdownTypeNone );
@@ -959,4 +962,5 @@ void KSMServer::shutdown( KApplication::
         sdmode = KApplication::ShutdownModeInteractive;
 
+    dialogActive = true;
     if ( !logoutConfirmed ) {
         KSMShutdownFeedback::start(); // make the screen gray


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic