diff --git a/ChangeLog b/ChangeLog index fdbc0d533..1c69b3c88 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ Bug fixes: - #7016 Fix script that generates version number - #7006 Resolve code scanning issues - #7012 Fix natural horizontal scrolling on Mac client +- #6997 Allow Windows to go to sleep depending on system preferences Enhancements: - #6998 Remove functionality related to the screen saver synchronisation diff --git a/src/lib/platform/MSWindowsScreen.cpp b/src/lib/platform/MSWindowsScreen.cpp index dfcc3707a..76cc46666 100644 --- a/src/lib/platform/MSWindowsScreen.cpp +++ b/src/lib/platform/MSWindowsScreen.cpp @@ -247,12 +247,6 @@ MSWindowsScreen::enable() // watch jump zones m_hook.setMode(kHOOK_WATCH_JUMP_ZONE); } - else { - // prevent the system from entering power saving modes. if - // it did we'd be forced to disconnect from the server and - // the server would not be able to wake us up. - ArchMiscWindows::addBusyState(ArchMiscWindows::kSYSTEM); - } } void @@ -268,11 +262,6 @@ MSWindowsScreen::disable() // enable special key sequences on win95 family enableSpecialKeys(true); } - else { - // allow the system to enter power saving mode - ArchMiscWindows::removeBusyState(ArchMiscWindows::kSYSTEM | - ArchMiscWindows::kDISPLAY); - } // tell key state m_keyState->disable(); @@ -1503,18 +1492,12 @@ MSWindowsScreen::onScreensaver(bool activated) m_screensaver->checkStarted(SYNERGY_MSG_SCREEN_SAVER, FALSE, 0)) { m_screensaverActive = true; sendEvent(m_events->forIPrimaryScreen().screensaverActivated()); - - // enable display power down - ArchMiscWindows::removeBusyState(ArchMiscWindows::kDISPLAY); } } else { if (m_screensaverActive) { m_screensaverActive = false; sendEvent(m_events->forIPrimaryScreen().screensaverDeactivated()); - - // disable display power down - ArchMiscWindows::addBusyState(ArchMiscWindows::kDISPLAY); } } diff --git a/src/lib/platform/MSWindowsScreenSaver.cpp b/src/lib/platform/MSWindowsScreenSaver.cpp index 96771b271..ea6a0ab03 100644 --- a/src/lib/platform/MSWindowsScreenSaver.cpp +++ b/src/lib/platform/MSWindowsScreenSaver.cpp @@ -113,9 +113,6 @@ MSWindowsScreenSaver::enable() if (m_wasSecure) { setSecure(true, m_wasSecureAnInt); } - - // restore display power down - ArchMiscWindows::removeBusyState(ArchMiscWindows::kDISPLAY); } void @@ -129,9 +126,6 @@ MSWindowsScreenSaver::disable() if (m_wasSecure) { setSecure(false, m_wasSecureAnInt); } - - // disable display power down - ArchMiscWindows::addBusyState(ArchMiscWindows::kDISPLAY); } void @@ -148,9 +142,6 @@ MSWindowsScreenSaver::activate() // no foreground window. pretend we got the event instead. DefWindowProc(NULL, WM_SYSCOMMAND, SC_SCREENSAVE, 0); } - - // restore power save when screen saver activates - ArchMiscWindows::removeBusyState(ArchMiscWindows::kDISPLAY); } } @@ -188,9 +179,6 @@ MSWindowsScreenSaver::deactivate() !m_wasEnabled, 0, SPIF_SENDWININICHANGE); SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, m_wasEnabled, 0, SPIF_SENDWININICHANGE); - - // disable display power down - ArchMiscWindows::removeBusyState(ArchMiscWindows::kDISPLAY); } bool