From 4de72a5ddd70b37c4e077c53dd60d1a8e4da7466 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Mon, 19 Nov 2012 17:14:29 -0600 Subject: Attempt to work around issue described in Bug 1288 --- kdesktop/lock/lockprocess.cc | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/kdesktop/lock/lockprocess.cc b/kdesktop/lock/lockprocess.cc index 1a58d4e52..47fad586c 100644 --- a/kdesktop/lock/lockprocess.cc +++ b/kdesktop/lock/lockprocess.cc @@ -58,6 +58,7 @@ #include #include #include +#include #include @@ -1303,9 +1304,19 @@ bool LockProcess::startSaver() connect( mEnsureScreenHiddenTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotForcePaintBackground()) ); mEnsureScreenHiddenTimer->start(DESKTOP_WALLPAPER_OBTAIN_TIMEOUT_MS, true); } - + + int exitTimer = 0; while ((backingPixmap.isNull()) && (mEnsureScreenHiddenTimer->isActive())) { - kapp->processEvents(); + kapp->eventLoop()->processEvents(TQEventLoop::ExcludeUserInput); + + // HACK + // Work around an issue with the underlying system whereby the TQTimer sometimes fails to time out! + // This issue was reported in Bug #1288 + usleep(100); + exitTimer++; + if (exitTimer > (DESKTOP_WALLPAPER_OBTAIN_TIMEOUT_MS*10)) { + break; + } } } } -- cgit v1.2.1