void KSMServer::killWM() { state = KillingWM; bool iswm = false; for ( KSMClient* c = clients.first(); c; c = clients.next() ) { if( isWM( c )) { iswm = true; kdDebug( 1218 ) << "killWM: client " << c->program() << "(" << c->clientId() << ")" << endl; SmsDie( c->connection() ); } } if( iswm ) { completeKillingWM(); QTimer::singleShot( 5000, this, SLOT( timeoutWMQuit() ) ); } else killingCompleted(); }
void KSMServer::deleteClient( KSMClient* client ) { if ( !clients.contains( client ) ) // paranoia return; clients.removeAll( client ); clientsToKill.removeAll( client ); clientsToSave.removeAll( client ); if ( client == clientInteracting ) { clientInteracting = 0; handlePendingInteractions(); } delete client; if ( state == Shutdown || state == Checkpoint || state == ClosingSubSession ) completeShutdownOrCheckpoint(); if ( state == Killing ) completeKilling(); else if ( state == KillingSubSession ) completeKillingSubSession(); if ( state == KillingWM ) completeKillingWM(); }