Revert "Issue #5041 - properly update activeDesk and activeDeskName when screen saver activates"

This reverts commit 3615add7b80838dc8b93cb89f2c8f87254db6c21.
This commit is contained in:
Jerry (Xinyu Hou) 2015-12-02 15:02:46 -08:00 committed by Xinyu Hou
parent da5e9527a3
commit 92a3c47ed2
1 changed files with 7 additions and 14 deletions

View File

@ -854,20 +854,13 @@ MSWindowsDesks::checkDesk()
// if we are told to shut down on desk switch, and this is not the
// first switch, then shut down.
// Issue #5041 workaround - prevent synergys from shutting down when screen
// saver activates - if it is restarted while the screen saver is active,
// the clipboard no longer works.
if (m_stopOnDeskSwitch && m_activeDesk != NULL && name != m_activeDeskName) {
if (!m_screensaver->isActive()) {
LOG((CLOG_DEBUG "shutting down because of desk switch \"%s\"->\"%s\"",
m_activeDeskName.c_str(), name.c_str()));
// saver activates - It does not come back cleanly.
if (m_stopOnDeskSwitch && m_activeDesk != NULL && name != m_activeDeskName
&& !m_screensaver->isActive()) {
LOG((CLOG_DEBUG "shutting down because of desk switch to \"%s\"", name.c_str()));
m_events->addEvent(Event(Event::kQuit));
return;
}
LOG((CLOG_DEBUG "screen saver active, ignoring desk switch \"%s\"->\"%s\"",
m_activeDeskName.c_str(), name.c_str()));
m_activeDesk = desk;
m_activeDeskName = name;
}
// if active desktop changed then tell the old and new desk threads
// about the change. don't switch desktops when the screensaver is