From 019f3bf5262bb1a168c2e874b1ca45d1dea9a6f2 Mon Sep 17 00:00:00 2001 From: Martin Klapetek Date: Thu, 19 Jun 2014 14:39:18 +0200 Subject: [PATCH] Revert "[ksmserver]Reinstate login & logout sounds" This reverts commit c2f45884310daba8672233e247fdaf4f9acd5b48. Apparently this can cause the login sequence to wait for PulseAudio and can delay the startup quite considerably, so temporarily reverting. REVIEW: 118636 CCBUG: 335948 Conflicts: ksmserver/plasma_workspace.notifyrc --- ksmserver/CMakeLists.txt | 1 - ksmserver/server.h | 2 -- ksmserver/shutdown.cpp | 31 +++---------------------------- ksmserver/startup.cpp | 7 +++---- 4 files changed, 6 insertions(+), 35 deletions(-) diff --git a/ksmserver/CMakeLists.txt b/ksmserver/CMakeLists.txt index a6e789fb2..49870fb54 100644 --- a/ksmserver/CMakeLists.txt +++ b/ksmserver/CMakeLists.txt @@ -102,4 +102,3 @@ install(TARGETS kcheckrunning ${INSTALL_TARGETS_DEFAULT_ARGS}) install( FILES org.kde.KSMServerInterface.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR}) install( DIRECTORY themes/ DESTINATION ${DATA_INSTALL_DIR}/ksmserver/themes ) -install( FILES plasma_workspace.notifyrc DESTINATION ${KNOTIFYRC_INSTALL_DIR} ) diff --git a/ksmserver/server.h b/ksmserver/server.h index d58b61095..3d19118c8 100644 --- a/ksmserver/server.h +++ b/ksmserver/server.h @@ -127,8 +127,6 @@ private Q_SLOTS: void kcmPhase1Timeout(); void kcmPhase2Timeout(); void pendingShutdownTimeout(); - void logoutSoundTimeout(); - void logoutSoundFinished(); void autoStart0(); void autoStart1(); diff --git a/ksmserver/shutdown.cpp b/ksmserver/shutdown.cpp index fc59acabd..6a6dca981 100644 --- a/ksmserver/shutdown.cpp +++ b/ksmserver/shutdown.cpp @@ -63,7 +63,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include -#include +// #include #include #include #include @@ -464,16 +464,9 @@ void KSMServer::completeShutdownOrCheckpoint() discardSession(); if ( state == Shutdown ) { - KNotification *n = KNotification::event(QStringLiteral("exitkde"), QString(), QPixmap(), 0l, KNotification::DefaultEvent); // KDE says good bye - connect(n, SIGNAL(closed()), this, SLOT(logoutSoundFinished())); - // https://bugs.kde.org/show_bug.cgi?id=228005 - // if sound is not working for some reason (e.g. no phonon - // backends are installed) the closed() signal never happens - // and logoutSoundFinished() never gets called. Add this timer to make - // sure the shutdown procedure continues even if sound system is broken. - QTimer::singleShot(5000, this, SLOT(logoutSoundTimeout())); - state = WaitingForKNotify; createLogoutEffectWidget(); + startKilling(); + } else if ( state == Checkpoint ) { foreach( KSMClient* c, clients ) { SmsSaveComplete( c->connection()); @@ -485,24 +478,6 @@ void KSMServer::completeShutdownOrCheckpoint() } -void KSMServer::logoutSoundTimeout() -{ - if (state != WaitingForKNotify) { - return; - } - kDebug(1218) << "logout sound timeout"; - logoutSoundFinished(); -} - -void KSMServer::logoutSoundFinished( ) -{ - if (state != WaitingForKNotify) { - return; - } - kDebug(1218) << "Logout event finished"; - startKilling(); -} - void KSMServer::startKilling() { kDebug( 1218 ) << "Starting killing clients"; diff --git a/ksmserver/startup.cpp b/ksmserver/startup.cpp index b8a642f05..11cc9689e 100644 --- a/ksmserver/startup.cpp +++ b/ksmserver/startup.cpp @@ -413,10 +413,9 @@ void KSMServer::autoStart2() } if( !defaultSession()) restoreLegacySession(KSharedConfig::openConfig().data()); - - KNotification::event(QStringLiteral("startkde"), - QString(), QPixmap(), 0l, - KNotification::DefaultEvent); // this is the time KDE is up, more or less +// KNotification::event( QStringLiteral( "startkde" ), +// QString(), QPixmap(), 0l, +// KNotification::DefaultEvent ); // this is the time KDE is up, more or less } void KSMServer::runUserAutostart()