From b28f50725ea13b5fb539ed4c0ca9b002090cff5b Mon Sep 17 00:00:00 2001 From: tpearson Date: Tue, 13 Sep 2011 18:14:53 +0000 Subject: Fix lock screen startup git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1253257 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdesktop/lock/lockprocess.cc | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'kdesktop') diff --git a/kdesktop/lock/lockprocess.cc b/kdesktop/lock/lockprocess.cc index 24fd8b939..6a22b6a68 100644 --- a/kdesktop/lock/lockprocess.cc +++ b/kdesktop/lock/lockprocess.cc @@ -503,22 +503,28 @@ void LockProcess::signalPipeSignal() //--------------------------------------------------------------------------- bool LockProcess::lock() { - if (startSaver()) { - // In case of a forced lock we don't react to events during - // the dead-time to give the screensaver some time to activate. - // That way we don't accidentally show the password dialog before - // the screensaver kicks in because the user moved the mouse after - // selecting "lock screen", that looks really untidy. - mBusy = true; - if (startLock()) - { - TQTimer::singleShot(1000, this, TQT_SLOT(slotDeadTimePassed())); - return true; - } - stopSaver(); - mBusy = false; - } - return false; + m_startupStatusDialog = new KSMModalDialog(this); + m_startupStatusDialog->setStatusMessage(i18n("Securing desktop session").append("...")); + m_startupStatusDialog->show(); + m_startupStatusDialog->setActiveWindow(); + tqApp->processEvents(); + + if (startSaver()) { + // In case of a forced lock we don't react to events during + // the dead-time to give the screensaver some time to activate. + // That way we don't accidentally show the password dialog before + // the screensaver kicks in because the user moved the mouse after + // selecting "lock screen", that looks really untidy. + mBusy = true; + if (startLock()) + { + TQTimer::singleShot(1000, this, TQT_SLOT(slotDeadTimePassed())); + return true; + } + stopSaver(); + mBusy = false; + } + return false; } //--------------------------------------------------------------------------- void LockProcess::slotDeadTimePassed() @@ -966,12 +972,6 @@ void LockProcess::ungrabInput() // bool LockProcess::startSaver() { - m_startupStatusDialog = new KSMModalDialog(this); - m_startupStatusDialog->setStatusMessage(i18n("Securing desktop session").append("...")); - m_startupStatusDialog->show(); - m_startupStatusDialog->setActiveWindow(); - tqApp->processEvents(); - if (!child_saver && !grabInput()) { kdWarning(1204) << "LockProcess::startSaver() grabInput() failed!!!!" << endl; -- cgit v1.2.1