Added check for the screen saver actually being active before

entering the loop waiting for it to deactivate.  The failure
to check was causing the screen saver code to kick in when
the screen saver timeout occurred, even if the screen saver
wasn't enabled (because Windows still sends the screen saver
activating message for no good reason when the screen saver
is disabled).
This commit is contained in:
crs 2003-03-21 19:16:37 +00:00
parent 95263289ac
commit 9dabd425a5
1 changed files with 9 additions and 0 deletions

View File

@ -100,6 +100,15 @@ CMSWindowsScreenSaver::checkStarted(UINT msg, WPARAM wParam, LPARAM lParam)
// on the windows nt family we wait for the desktop to
// change until it's neither the Screen-Saver desktop
// nor a desktop we can't open (the login desktop).
// since windows will send the request-to-start-screen-
// saver message even when the screen saver is disabled
// we first check that the screen saver is indeed active
// before watching for it to stop.
if (!isActive()) {
LOG((CLOG_DEBUG "can't open screen saver desktop"));
return false;
}
watchDesktop();
}