From 0621ed70db1176471ce992b8eeb4d32d90f2f547 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Wed, 8 Apr 2015 15:27:25 -0500 Subject: Eliminate usleep() loop during kdesktop startup Do not switch desktops if lock fails to engage (cherry picked from commit 751c96f9b1fc01675a1a9d34831104f98adfd84f) --- kdesktop/krootwm.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'kdesktop/krootwm.cc') diff --git a/kdesktop/krootwm.cc b/kdesktop/krootwm.cc index d12e024ab..72b9f0f5d 100644 --- a/kdesktop/krootwm.cc +++ b/kdesktop/krootwm.cc @@ -911,7 +911,9 @@ void KRootWm::doNewSession( bool lock ) if (lock) { m_pSaver->lockScreen(); - m_pSaver->waitForLockEngage(); + if (!m_pSaver->waitForLockEngage()) { + return; + } } DM().startReserve(); -- cgit v1.2.1