diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-08-08 00:01:35 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-08-08 00:01:35 -0500 |
commit | da560698f1098a4ebca54ead7436110003f2a716 (patch) | |
tree | 5b6ddfb6c4e5bda3598aaedfaa461ba2050229ad | |
parent | 1260c7da1a7fb5e324660313e5a2879499958df2 (diff) | |
download | tdebase-da560698f1098a4ebca54ead7436110003f2a716.tar.gz tdebase-da560698f1098a4ebca54ead7436110003f2a716.zip |
Fix logout dialog appearing during client interaction
-rw-r--r-- | ksmserver/shutdown.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/ksmserver/shutdown.cpp b/ksmserver/shutdown.cpp index 8af8f0450..cf849e757 100644 --- a/ksmserver/shutdown.cpp +++ b/ksmserver/shutdown.cpp @@ -439,6 +439,7 @@ void KSMServer::saveYourselfDone( KSMClient* client, bool success ) } } + notificationTimer.stop(); updateLogoutStatusDialog(); } @@ -454,6 +455,9 @@ void KSMServer::updateLogoutStatusDialog() pendingInteraction = true; } } + if (clientInteracting) { + pendingInteraction = true; + } if (shutdownNotifierIPDlg) { int waitingClients = 0; @@ -477,6 +481,9 @@ void KSMServer::updateLogoutStatusDialog() } if (inPhase2) { if (phase2ClientCount > 0) { + if (!notificationTimer.isActive()) { + notificationTimer.start( KSMSERVER_NOTIFICATION_MANUAL_OPTIONS_TIMEOUT, true ); + } static_cast<KSMShutdownIPDlg*>(shutdownNotifierIPDlg)->show(); static_cast<KSMShutdownIPDlg*>(shutdownNotifierIPDlg)->setNotificationActionButtonsSkipText(i18n("Skip Notification (%1)").arg(((KSMSERVER_SHUTDOWN_CLIENT_UNRESPONSIVE_TIMEOUT - (protectionTimerCounter*1000))/1000)+1)); if (nextClientToKill == "") { @@ -489,8 +496,16 @@ void KSMServer::updateLogoutStatusDialog() } else { if (pendingInteraction) { - static_cast<KSMShutdownIPDlg*>(shutdownNotifierIPDlg)->hide(); +#if 0 static_cast<KSMShutdownIPDlg*>(shutdownNotifierIPDlg)->setNotificationActionButtonsSkipText(i18n("Ignore and Resume Logout")); +#else + // Hide dialog and buttons + static_cast<KSMShutdownIPDlg*>(shutdownNotifierIPDlg)->hide(); + notificationTimer.stop(); + static_cast<KSMShutdownIPDlg*>(shutdownNotifierIPDlg)->hideNotificationActionButtons(); + disconnect(shutdownNotifierIPDlg, SIGNAL(abortLogoutClicked()), this, SLOT(cancelShutdown())); + disconnect(shutdownNotifierIPDlg, SIGNAL(skipNotificationClicked()), this, SLOT(forceSkipSaveYourself())); +#endif if (nextClientToKill == "") { static_cast<KSMShutdownIPDlg*>(shutdownNotifierIPDlg)->setStatusMessage(i18n("An application is requesting attention, logout paused...")); } @@ -499,6 +514,9 @@ void KSMServer::updateLogoutStatusDialog() } } else { + if (!notificationTimer.isActive()) { + notificationTimer.start( KSMSERVER_NOTIFICATION_MANUAL_OPTIONS_TIMEOUT, true ); + } static_cast<KSMShutdownIPDlg*>(shutdownNotifierIPDlg)->show(); static_cast<KSMShutdownIPDlg*>(shutdownNotifierIPDlg)->setNotificationActionButtonsSkipText(i18n("Skip Notification (%1)").arg(((KSMSERVER_SHUTDOWN_CLIENT_UNRESPONSIVE_TIMEOUT - (protectionTimerCounter*1000))/1000)+1)); if (nextClientToKill == "") { |