If drkonqi launches during logout show it after 30 seconds have elapsed

pull/2/head
Timothy Pearson 10 years ago
parent cd928d143d
commit 699217f5ac

@ -972,6 +972,16 @@ bool KSMServer::isNotifier( const TQString& program ) const
return (program == "knotify"); return (program == "knotify");
} }
bool KSMServer::isCrashHandler( const KSMClient* client ) const
{
return isNotifier( client->program());
}
bool KSMServer::isCrashHandler( const TQString& program ) const
{
return (program == "drkonqi");
}
bool KSMServer::defaultSession() const bool KSMServer::defaultSession() const
{ {
return sessionGroup.isEmpty(); return sessionGroup.isEmpty();

@ -161,6 +161,8 @@ private:
bool isDesktop( const TQString& program ) const; bool isDesktop( const TQString& program ) const;
bool isNotifier( const KSMClient* client ) const; bool isNotifier( const KSMClient* client ) const;
bool isNotifier( const TQString& program ) const; bool isNotifier( const TQString& program ) const;
bool isCrashHandler( const KSMClient* client ) const;
bool isCrashHandler( const TQString& program ) const;
bool defaultSession() const; // empty session bool defaultSession() const; // empty session
void setupXIOErrorHandler(); void setupXIOErrorHandler();

@ -484,7 +484,7 @@ void KSMServer::updateLogoutStatusDialog()
if (c->saveYourselfDone) { if (c->saveYourselfDone) {
continue; continue;
} }
if( isWM( c ) || isCM( c ) || isNotifier( c ) ) { if( isWM( c ) || isCM( c ) || isNotifier( c ) || isDesktop( c ) ) {
continue; continue;
} }
waitingClients++; waitingClients++;
@ -814,7 +814,7 @@ void KSMServer::completeShutdownOrCheckpoint()
TQDateTime currentDateTime = TQDateTime::currentDateTime(); TQDateTime currentDateTime = TQDateTime::currentDateTime();
TQDateTime oldestFoundDateTime = currentDateTime; TQDateTime oldestFoundDateTime = currentDateTime;
for( KSMClient* c = clients.first(); c; c = clients.next()) { for( KSMClient* c = clients.first(); c; c = clients.next()) {
if( isWM( c ) || isCM( c ) || isNotifier( c ) ) { if( isWM( c ) || isCM( c ) || isNotifier( c ) || isDesktop( c ) ) {
continue; continue;
} }
if (c->program() != "") { if (c->program() != "") {
@ -857,8 +857,9 @@ void KSMServer::startKilling()
// kill all clients // kill all clients
state = Killing; state = Killing;
for ( KSMClient* c = clients.first(); c; c = clients.next() ) { for ( KSMClient* c = clients.first(); c; c = clients.next() ) {
if( isWM( c ) || isCM( c ) || isNotifier( c ) ) // kill the WM and CM as the last one in order to reduce flicker. Also wait to kill knotify to avoid logout delays if( isWM( c ) || isCM( c ) || isNotifier( c ) || isDesktop( c ) ) { // kill the WM and CM as the last one in order to reduce flicker. Also wait to kill knotify to avoid logout delays
continue; continue;
}
kdDebug( 1218 ) << "completeShutdown: client " << c->program() << "(" << c->clientId() << ")" << endl; kdDebug( 1218 ) << "completeShutdown: client " << c->program() << "(" << c->clientId() << ")" << endl;
c->terminationRequestTimeStamp = TQDateTime::currentDateTime(); c->terminationRequestTimeStamp = TQDateTime::currentDateTime();
SmsDie( c->connection() ); SmsDie( c->connection() );
@ -883,7 +884,7 @@ void KSMServer::completeKilling()
TQDateTime currentDateTime = TQDateTime::currentDateTime(); TQDateTime currentDateTime = TQDateTime::currentDateTime();
TQDateTime oldestFoundDateTime = currentDateTime; TQDateTime oldestFoundDateTime = currentDateTime;
for( KSMClient* c = clients.first(); c; c = clients.next()) { for( KSMClient* c = clients.first(); c; c = clients.next()) {
if( isWM( c ) || isCM( c ) || isNotifier( c ) ) { if( isWM( c ) || isCM( c ) || isNotifier( c ) || isDesktop( c ) ) {
continue; continue;
} }
if (c->program() != "") { if (c->program() != "") {
@ -929,6 +930,11 @@ void KSMServer::killWM()
shutdownNotifierIPDlg=0; shutdownNotifierIPDlg=0;
} }
for ( KSMClient* c = clients.first(); c; c = clients.next() ) { for ( KSMClient* c = clients.first(); c; c = clients.next() ) {
if( isDesktop( c )) {
iswm = true;
c->terminationRequestTimeStamp = TQDateTime::currentDateTime();
SmsDie( c->connection() );
}
if( isNotifier( c )) { if( isNotifier( c )) {
iswm = true; iswm = true;
c->terminationRequestTimeStamp = TQDateTime::currentDateTime(); c->terminationRequestTimeStamp = TQDateTime::currentDateTime();
@ -979,6 +985,11 @@ void KSMServer::killingCompleted()
if (child != 0) { if (child != 0) {
kapp->quit(); kapp->quit();
} }
else if (child == 0) {
// If any remaining client(s) do not exit quickly (e.g. drkonqui) terminate so that they can be seen and interacted with
sleep(30);
exit(0);
}
} }
else { else {
kapp->quit(); kapp->quit();

@ -419,9 +419,11 @@ void KonqDirPart::slotClipboardDataChanged()
KURL::List lst; KURL::List lst;
TQMimeSource *data = TQApplication::clipboard()->data(); TQMimeSource *data = TQApplication::clipboard()->data();
if ( data->provides( "application/x-tde-cutselection" ) && data->provides( "text/uri-list" ) ) if ( data->provides( "application/x-tde-cutselection" ) && data->provides( "text/uri-list" ) ) {
if ( KonqDrag::decodeIsCutSelection( data ) ) if ( KonqDrag::decodeIsCutSelection( data ) ) {
(void) KURLDrag::decode( data, lst ); (void) KURLDrag::decode( data, lst );
}
}
disableIcons( lst ); disableIcons( lst );
@ -432,8 +434,9 @@ void KonqDirPart::updatePasteAction() // KDE4: merge into method above
{ {
TQString actionText = TDEIO::pasteActionText(); TQString actionText = TDEIO::pasteActionText();
bool paste = !actionText.isEmpty(); bool paste = !actionText.isEmpty();
if ( paste ) if ( paste ) {
emit m_extension->setActionText( "paste", actionText ); emit m_extension->setActionText( "paste", actionText );
}
emit m_extension->enableAction( "paste", paste ); emit m_extension->enableAction( "paste", paste );
} }

Loading…
Cancel
Save