SYNERGY-856 - Add option to prevent client from sleeping (#7001)
* Disable thread execution state changes preventing the system from going to sleep * Update changelog * Added option to the GUI * Only set system to be in use * Remove leftover code affecting display and system power off * Add option parsing to the correct place * Update changelog * Remove prevent sleep option from struct initializer, replace NULL with nullptr in relevant places * Remove duplicated code * Prevent sleep on Mac clients * SYNERGY-856 - Return language sync option
This commit is contained in:
@ -247,6 +247,10 @@ MSWindowsScreen::enable()
|
||||
// watch jump zones
|
||||
m_hook.setMode(kHOOK_WATCH_JUMP_ZONE);
|
||||
}
|
||||
|
||||
if (App::instance().argsBase().m_preventSleep) {
|
||||
ArchMiscWindows::addBusyState(ArchMiscWindows::kSYSTEM);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@ -262,6 +266,10 @@ MSWindowsScreen::disable()
|
||||
// enable special key sequences on win95 family
|
||||
enableSpecialKeys(true);
|
||||
}
|
||||
else {
|
||||
// allow the system to enter power saving mode
|
||||
ArchMiscWindows::removeBusyState(ArchMiscWindows::kSYSTEM);
|
||||
}
|
||||
|
||||
// tell key state
|
||||
m_keyState->disable();
|
||||
|
||||
Reference in New Issue
Block a user