Fix lock screen startup

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1253257 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 13 years ago
parent 2f40ab1411
commit b28f50725e

@ -503,22 +503,28 @@ void LockProcess::signalPipeSignal()
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
bool LockProcess::lock() bool LockProcess::lock()
{ {
if (startSaver()) { m_startupStatusDialog = new KSMModalDialog(this);
// In case of a forced lock we don't react to events during m_startupStatusDialog->setStatusMessage(i18n("Securing desktop session").append("..."));
// the dead-time to give the screensaver some time to activate. m_startupStatusDialog->show();
// That way we don't accidentally show the password dialog before m_startupStatusDialog->setActiveWindow();
// the screensaver kicks in because the user moved the mouse after tqApp->processEvents();
// selecting "lock screen", that looks really untidy.
mBusy = true; if (startSaver()) {
if (startLock()) // In case of a forced lock we don't react to events during
{ // the dead-time to give the screensaver some time to activate.
TQTimer::singleShot(1000, this, TQT_SLOT(slotDeadTimePassed())); // That way we don't accidentally show the password dialog before
return true; // the screensaver kicks in because the user moved the mouse after
} // selecting "lock screen", that looks really untidy.
stopSaver(); mBusy = true;
mBusy = false; if (startLock())
} {
return false; TQTimer::singleShot(1000, this, TQT_SLOT(slotDeadTimePassed()));
return true;
}
stopSaver();
mBusy = false;
}
return false;
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void LockProcess::slotDeadTimePassed() void LockProcess::slotDeadTimePassed()
@ -966,12 +972,6 @@ void LockProcess::ungrabInput()
// //
bool LockProcess::startSaver() 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()) if (!child_saver && !grabInput())
{ {
kdWarning(1204) << "LockProcess::startSaver() grabInput() failed!!!!" << endl; kdWarning(1204) << "LockProcess::startSaver() grabInput() failed!!!!" << endl;

Loading…
Cancel
Save