Issue #5041 - properly update activeDesk and activeDeskName when screen saver activates
Ensure that we actually kill the server if we go from screen saver desk to real desk.
This commit is contained in:
parent
1fc28392d0
commit
9036d42469
|
@ -854,13 +854,20 @@ MSWindowsDesks::checkDesk()
|
||||||
// if we are told to shut down on desk switch, and this is not the
|
// if we are told to shut down on desk switch, and this is not the
|
||||||
// first switch, then shut down.
|
// first switch, then shut down.
|
||||||
// Issue #5041 workaround - prevent synergys from shutting down when screen
|
// Issue #5041 workaround - prevent synergys from shutting down when screen
|
||||||
// saver activates - It does not come back cleanly.
|
// saver activates - if it is restarted while the screen saver is active,
|
||||||
if (m_stopOnDeskSwitch && m_activeDesk != NULL && name != m_activeDeskName
|
// the clipboard no longer works.
|
||||||
&& !m_screensaver->isActive()) {
|
if (m_stopOnDeskSwitch && m_activeDesk != NULL && name != m_activeDeskName) {
|
||||||
LOG((CLOG_DEBUG "shutting down because of desk switch to \"%s\"", name.c_str()));
|
if (!m_screensaver->isActive()) {
|
||||||
|
LOG((CLOG_DEBUG "shutting down because of desk switch \"%s\"->\"%s\"",
|
||||||
|
m_activeDeskName.c_str(), name.c_str()));
|
||||||
m_events->addEvent(Event(Event::kQuit));
|
m_events->addEvent(Event(Event::kQuit));
|
||||||
return;
|
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
|
// if active desktop changed then tell the old and new desk threads
|
||||||
// about the change. don't switch desktops when the screensaver is
|
// about the change. don't switch desktops when the screensaver is
|
||||||
|
|
Loading…
Reference in New Issue