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:
parent
95263289ac
commit
9dabd425a5
|
@ -100,6 +100,15 @@ CMSWindowsScreenSaver::checkStarted(UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
// on the windows nt family we wait for the desktop to
|
// on the windows nt family we wait for the desktop to
|
||||||
// change until it's neither the Screen-Saver desktop
|
// change until it's neither the Screen-Saver desktop
|
||||||
// nor a desktop we can't open (the login 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();
|
watchDesktop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue