summaryrefslogtreecommitdiffstats
path: root/ksmserver/shutdown.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-09-10 22:32:00 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-09-10 22:32:00 +0000
commit1f40ada72d693d681ec6a32c2ef717e8dd73b5bb (patch)
tree54c647b881fd1f91a9cd4390237ec0a8888a8f34 /ksmserver/shutdown.cpp
parent29570c5acb30252e5db7552b89150035bbdd9409 (diff)
downloadtdebase-1f40ada72d693d681ec6a32c2ef717e8dd73b5bb.tar.gz
tdebase-1f40ada72d693d681ec6a32c2ef717e8dd73b5bb.zip
Force windows with the modal system notification atom set to stay above other windows
Enhance logout sequence appearance Add remote folder synchronization on logout support Fix flickering to black window with subsequent partial repaint of certain widgets occurring during fancy logout sequence git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1252640 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksmserver/shutdown.cpp')
-rw-r--r--ksmserver/shutdown.cpp27
1 files changed, 24 insertions, 3 deletions
diff --git a/ksmserver/shutdown.cpp b/ksmserver/shutdown.cpp
index a153b2806..b5e40a50b 100644
--- a/ksmserver/shutdown.cpp
+++ b/ksmserver/shutdown.cpp
@@ -81,6 +81,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <kdebug.h>
#include <knotifyclient.h>
+#include <libkrsync/krsync.h>
+
#include "server.h"
#include "global.h"
#include "shutdowndlg.h"
@@ -182,6 +184,7 @@ void KSMServer::shutdownInternal( KApplication::ShutdownConfirm confirm,
shutdownType = sdtype;
shutdownMode = sdmode;
bootOption = bopt;
+ shutdownNotifierIPDlg = 0;
// shall we save the session on logout?
saveSession = ( config->readEntry( "loginMode", "restorePreviousLogout" ) == "restorePreviousLogout" );
@@ -189,6 +192,19 @@ void KSMServer::shutdownInternal( KApplication::ShutdownConfirm confirm,
if (showFancyLogout) {
KSMShutdownIPFeedback::showit(); // hide the UGLY logout process from the user
shutdownNotifierIPDlg = KSMShutdownIPDlg::showShutdownIP();
+ while (!KSMShutdownIPFeedback::ispainted()) {
+ tqApp->processEvents();
+ }
+ }
+
+ // synchronize any folders that were requested for shutdown sync
+ if (shutdownNotifierIPDlg) {
+ static_cast<KSMShutdownIPDlg*>(shutdownNotifierIPDlg)->setStatusMessage(i18n("Synchronizing remote folders").append("..."));
+ }
+ KRsync krs(this, "");
+ krs.executeLogoutAutoSync();
+ if (shutdownNotifierIPDlg) {
+ static_cast<KSMShutdownIPDlg*>(shutdownNotifierIPDlg)->setStatusMessage("");
}
if ( saveSession )
@@ -196,7 +212,9 @@ void KSMServer::shutdownInternal( KApplication::ShutdownConfirm confirm,
// Set the real desktop background to black so that exit looks
// clean regardless of what was on "our" desktop.
- TQT_TQWIDGET(kapp->desktop())->setBackgroundColor( Qt::black );
+ if (!showFancyLogout) {
+ TQT_TQWIDGET(kapp->desktop())->setBackgroundColor( Qt::black );
+ }
state = Shutdown;
wmPhase1WaitingCount = 0;
saveType = saveSession?SmSaveBoth:SmSaveGlobal;
@@ -520,7 +538,7 @@ void KSMServer::startKilling()
// kill all clients
state = Killing;
for ( KSMClient* c = clients.first(); c; c = clients.next() ) {
- if( isWM( c )) // kill the WM as the last one in order to reduce flicker
+ if( isWM( c ) || isCM( c ) ) // kill the WM and CM as the last one in order to reduce flicker
continue;
kdDebug( 1218 ) << "completeShutdown: client " << c->program() << "(" << c->clientId() << ")" << endl;
SmsDie( c->connection() );
@@ -539,7 +557,7 @@ void KSMServer::completeKilling()
if( state == Killing ) {
bool wait = false;
for( KSMClient* c = clients.first(); c; c = clients.next()) {
- if( isWM( c ))
+ if( isWM( c ) || isCM( c ) )
continue;
wait = true; // still waiting for clients to go away
}
@@ -563,6 +581,9 @@ void KSMServer::killWM()
kdDebug( 1218 ) << "killWM: client " << c->program() << "(" << c->clientId() << ")" << endl;
SmsDie( c->connection() );
}
+ if( isCM( c )) {
+ SmsDie( c->connection() );
+ }
}
if( iswm ) {
completeKillingWM();