summaryrefslogtreecommitdiffstats
path: root/ksmserver/shutdown.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-07-18 10:22:48 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-07-18 10:22:48 -0500
commit1eb5bc816598318458e3a6459663af103a46094b (patch)
tree145e8ec65da86972a2fcf2f25ff898f1f29009a0 /ksmserver/shutdown.cpp
parentd41051b3a2e2440f8648a8b30bc0e4b3524d3f13 (diff)
downloadtdebase-1eb5bc816598318458e3a6459663af103a46094b.tar.gz
tdebase-1eb5bc816598318458e3a6459663af103a46094b.zip
Beautify logout process
Diffstat (limited to 'ksmserver/shutdown.cpp')
-rw-r--r--ksmserver/shutdown.cpp22
1 files changed, 18 insertions, 4 deletions
diff --git a/ksmserver/shutdown.cpp b/ksmserver/shutdown.cpp
index 4f064ece3..5809cd295 100644
--- a/ksmserver/shutdown.cpp
+++ b/ksmserver/shutdown.cpp
@@ -706,15 +706,17 @@ void KSMServer::killWM()
shutdownNotifierIPDlg=0;
}
for ( KSMClient* c = clients.first(); c; c = clients.next() ) {
- if( isWM( c )) {
+ if( isNotifier( c )) {
iswm = true;
- kdDebug( 1218 ) << "killWM: client " << c->program() << "(" << c->clientId() << ")" << endl;
SmsDie( c->connection() );
}
if( isCM( c )) {
+ iswm = true;
SmsDie( c->connection() );
}
- if( isNotifier( c )) {
+ if( isWM( c )) {
+ iswm = true;
+ kdDebug( 1218 ) << "killWM: client " << c->program() << "(" << c->clientId() << ")" << endl;
SmsDie( c->connection() );
}
}
@@ -742,7 +744,19 @@ void KSMServer::completeKillingWM()
void KSMServer::killingCompleted()
{
SHUTDOWN_MARKER("killingCompleted");
- kapp->quit();
+ DM dmObject;
+ int dmType = dmObject.type();
+ if ((dmType == DM::NewTDM) || (dmType == DM::OldTDM) || (dmType == DM::GDM)) {
+ // Hide any remaining windows until the X server is terminated by the display manager
+ pid_t child;
+ child = fork();
+ if (child != 0) {
+ kapp->quit();
+ }
+ }
+ else {
+ kapp->quit();
+ }
}
// called when KNotify performs notification for logout (not when sound is finished though)