SYNERGY-993 - Remove code related to the screen saver synchronization functionality (#6998)
* Remove code related to the screen saver synchronization functionality * Update changelog * Update formatting, add const qualifier Co-authored-by: SerhiiGadzhilov <71632867+SerhiiGadzhilov@users.noreply.github.com>
This commit is contained in:
parent
a7f3b95b4d
commit
332dea5c40
7 changed files with 5 additions and 56 deletions
|
|
@ -6,7 +6,7 @@ Bug fixes:
|
||||||
- #7012 Fix natural horizontal scrolling on Mac client
|
- #7012 Fix natural horizontal scrolling on Mac client
|
||||||
|
|
||||||
Enhancements:
|
Enhancements:
|
||||||
|
- #6998 Remove functionality related to the screen saver synchronisation
|
||||||
===========
|
===========
|
||||||
|
|
||||||
v1.14.0-rc1
|
v1.14.0-rc1
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,6 @@ void ServerConfig::saveSettings()
|
||||||
settings().setValue("hasHeartbeat", hasHeartbeat());
|
settings().setValue("hasHeartbeat", hasHeartbeat());
|
||||||
settings().setValue("heartbeat", heartbeat());
|
settings().setValue("heartbeat", heartbeat());
|
||||||
settings().setValue("relativeMouseMoves", relativeMouseMoves());
|
settings().setValue("relativeMouseMoves", relativeMouseMoves());
|
||||||
settings().setValue("screenSaverSync", screenSaverSync());
|
|
||||||
settings().setValue("win32KeepForeground", win32KeepForeground());
|
settings().setValue("win32KeepForeground", win32KeepForeground());
|
||||||
settings().setValue("hasSwitchDelay", hasSwitchDelay());
|
settings().setValue("hasSwitchDelay", hasSwitchDelay());
|
||||||
settings().setValue("switchDelay", switchDelay());
|
settings().setValue("switchDelay", switchDelay());
|
||||||
|
|
@ -163,7 +162,6 @@ void ServerConfig::loadSettings()
|
||||||
haveHeartbeat(settings().value("hasHeartbeat", false).toBool());
|
haveHeartbeat(settings().value("hasHeartbeat", false).toBool());
|
||||||
setHeartbeat(settings().value("heartbeat", 5000).toInt());
|
setHeartbeat(settings().value("heartbeat", 5000).toInt());
|
||||||
setRelativeMouseMoves(settings().value("relativeMouseMoves", false).toBool());
|
setRelativeMouseMoves(settings().value("relativeMouseMoves", false).toBool());
|
||||||
setScreenSaverSync(settings().value("screenSaverSync", true).toBool());
|
|
||||||
setWin32KeepForeground(settings().value("win32KeepForeground", false).toBool());
|
setWin32KeepForeground(settings().value("win32KeepForeground", false).toBool());
|
||||||
haveSwitchDelay(settings().value("hasSwitchDelay", false).toBool());
|
haveSwitchDelay(settings().value("hasSwitchDelay", false).toBool());
|
||||||
setSwitchDelay(settings().value("switchDelay", 250).toInt());
|
setSwitchDelay(settings().value("switchDelay", 250).toInt());
|
||||||
|
|
@ -263,7 +261,6 @@ QTextStream& operator<<(QTextStream& outStream, const ServerConfig& config)
|
||||||
outStream << "\t" << "heartbeat = " << config.heartbeat() << endl;
|
outStream << "\t" << "heartbeat = " << config.heartbeat() << endl;
|
||||||
|
|
||||||
outStream << "\t" << "relativeMouseMoves = " << (config.relativeMouseMoves() ? "true" : "false") << endl;
|
outStream << "\t" << "relativeMouseMoves = " << (config.relativeMouseMoves() ? "true" : "false") << endl;
|
||||||
outStream << "\t" << "screenSaverSync = " << (config.screenSaverSync() ? "true" : "false") << endl;
|
|
||||||
outStream << "\t" << "win32KeepForeground = " << (config.win32KeepForeground() ? "true" : "false") << endl;
|
outStream << "\t" << "win32KeepForeground = " << (config.win32KeepForeground() ? "true" : "false") << endl;
|
||||||
outStream << "\t" << "disableLockToScreen = " << (config.disableLockToScreen() ? "true" : "false") << endl;
|
outStream << "\t" << "disableLockToScreen = " << (config.disableLockToScreen() ? "true" : "false") << endl;
|
||||||
outStream << "\t" << "clipboardSharing = " << (config.clipboardSharing() ? "true" : "false") << endl;
|
outStream << "\t" << "clipboardSharing = " << (config.clipboardSharing() ? "true" : "false") << endl;
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,6 @@ class ServerConfig : public BaseConfig, public GUI::Config::ConfigBase
|
||||||
bool hasHeartbeat() const { return m_HasHeartbeat; }
|
bool hasHeartbeat() const { return m_HasHeartbeat; }
|
||||||
int heartbeat() const { return m_Heartbeat; }
|
int heartbeat() const { return m_Heartbeat; }
|
||||||
bool relativeMouseMoves() const { return m_RelativeMouseMoves; }
|
bool relativeMouseMoves() const { return m_RelativeMouseMoves; }
|
||||||
bool screenSaverSync() const { return m_ScreenSaverSync; }
|
|
||||||
bool win32KeepForeground() const { return m_Win32KeepForeground; }
|
bool win32KeepForeground() const { return m_Win32KeepForeground; }
|
||||||
bool hasSwitchDelay() const { return m_HasSwitchDelay; }
|
bool hasSwitchDelay() const { return m_HasSwitchDelay; }
|
||||||
int switchDelay() const { return m_SwitchDelay; }
|
int switchDelay() const { return m_SwitchDelay; }
|
||||||
|
|
@ -98,7 +97,6 @@ class ServerConfig : public BaseConfig, public GUI::Config::ConfigBase
|
||||||
void haveHeartbeat(bool on) { m_HasHeartbeat = on; }
|
void haveHeartbeat(bool on) { m_HasHeartbeat = on; }
|
||||||
void setHeartbeat(int val) { m_Heartbeat = val; }
|
void setHeartbeat(int val) { m_Heartbeat = val; }
|
||||||
void setRelativeMouseMoves(bool on) { m_RelativeMouseMoves = on; }
|
void setRelativeMouseMoves(bool on) { m_RelativeMouseMoves = on; }
|
||||||
void setScreenSaverSync(bool on) { m_ScreenSaverSync = on; }
|
|
||||||
void setWin32KeepForeground(bool on) { m_Win32KeepForeground = on; }
|
void setWin32KeepForeground(bool on) { m_Win32KeepForeground = on; }
|
||||||
void haveSwitchDelay(bool on) { m_HasSwitchDelay = on; }
|
void haveSwitchDelay(bool on) { m_HasSwitchDelay = on; }
|
||||||
void setSwitchDelay(int val) { m_SwitchDelay = val; }
|
void setSwitchDelay(int val) { m_SwitchDelay = val; }
|
||||||
|
|
@ -132,7 +130,6 @@ class ServerConfig : public BaseConfig, public GUI::Config::ConfigBase
|
||||||
bool m_HasHeartbeat;
|
bool m_HasHeartbeat;
|
||||||
int m_Heartbeat;
|
int m_Heartbeat;
|
||||||
bool m_RelativeMouseMoves;
|
bool m_RelativeMouseMoves;
|
||||||
bool m_ScreenSaverSync;
|
|
||||||
bool m_Win32KeepForeground;
|
bool m_Win32KeepForeground;
|
||||||
bool m_HasSwitchDelay;
|
bool m_HasSwitchDelay;
|
||||||
int m_SwitchDelay;
|
int m_SwitchDelay;
|
||||||
|
|
|
||||||
|
|
@ -758,9 +758,6 @@ Config::readSectionOptions(ConfigReadContext& s)
|
||||||
else if (name == "switchNeedsAlt") {
|
else if (name == "switchNeedsAlt") {
|
||||||
addOption("", kOptionScreenSwitchNeedsAlt, s.parseBoolean(value));
|
addOption("", kOptionScreenSwitchNeedsAlt, s.parseBoolean(value));
|
||||||
}
|
}
|
||||||
else if (name == "screenSaverSync") {
|
|
||||||
addOption("", kOptionScreenSaverSync, s.parseBoolean(value));
|
|
||||||
}
|
|
||||||
else if (name == "relativeMouseMoves") {
|
else if (name == "relativeMouseMoves") {
|
||||||
addOption("", kOptionRelativeMouseMoves, s.parseBoolean(value));
|
addOption("", kOptionRelativeMouseMoves, s.parseBoolean(value));
|
||||||
}
|
}
|
||||||
|
|
@ -1392,9 +1389,6 @@ Config::getOptionName(OptionID id)
|
||||||
if (id == kOptionScreenSwitchNeedsAlt) {
|
if (id == kOptionScreenSwitchNeedsAlt) {
|
||||||
return "switchNeedsAlt";
|
return "switchNeedsAlt";
|
||||||
}
|
}
|
||||||
if (id == kOptionScreenSaverSync) {
|
|
||||||
return "screenSaverSync";
|
|
||||||
}
|
|
||||||
if (id == kOptionXTestXineramaUnaware) {
|
if (id == kOptionXTestXineramaUnaware) {
|
||||||
return "xtestIsXineramaUnaware";
|
return "xtestIsXineramaUnaware";
|
||||||
}
|
}
|
||||||
|
|
@ -1428,7 +1422,6 @@ Config::getOptionValue(OptionID id, OptionValue value)
|
||||||
id == kOptionScreenSwitchNeedsShift ||
|
id == kOptionScreenSwitchNeedsShift ||
|
||||||
id == kOptionScreenSwitchNeedsControl ||
|
id == kOptionScreenSwitchNeedsControl ||
|
||||||
id == kOptionScreenSwitchNeedsAlt ||
|
id == kOptionScreenSwitchNeedsAlt ||
|
||||||
id == kOptionScreenSaverSync ||
|
|
||||||
id == kOptionXTestXineramaUnaware ||
|
id == kOptionXTestXineramaUnaware ||
|
||||||
id == kOptionRelativeMouseMoves ||
|
id == kOptionRelativeMouseMoves ||
|
||||||
id == kOptionWin32KeepForeground ||
|
id == kOptionWin32KeepForeground ||
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,6 @@ Screen::Screen(IPlatformScreen* platformScreen, IEventQueue* events) :
|
||||||
m_isPrimary(platformScreen->isPrimary()),
|
m_isPrimary(platformScreen->isPrimary()),
|
||||||
m_enabled(false),
|
m_enabled(false),
|
||||||
m_entered(m_isPrimary),
|
m_entered(m_isPrimary),
|
||||||
m_screenSaverSync(true),
|
|
||||||
m_fakeInput(false),
|
m_fakeInput(false),
|
||||||
m_events(events),
|
m_events(events),
|
||||||
m_mock(false),
|
m_mock(false),
|
||||||
|
|
@ -176,14 +175,9 @@ Screen::grabClipboard(ClipboardID id)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Screen::screensaver(bool activate)
|
Screen::screensaver(bool) const
|
||||||
{
|
{
|
||||||
if (!m_isPrimary) {
|
// do nothing
|
||||||
// activate/deactivation screen saver iff synchronization enabled
|
|
||||||
if (m_screenSaverSync) {
|
|
||||||
m_screen->screensaver(activate);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -254,15 +248,6 @@ Screen::resetOptions()
|
||||||
// reset options
|
// reset options
|
||||||
m_halfDuplex = 0;
|
m_halfDuplex = 0;
|
||||||
|
|
||||||
// if screen saver synchronization was off then turn it on since
|
|
||||||
// that's the default option state.
|
|
||||||
if (!m_screenSaverSync) {
|
|
||||||
m_screenSaverSync = true;
|
|
||||||
if (!m_isPrimary) {
|
|
||||||
m_screen->openScreensaver(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// let screen handle its own options
|
// let screen handle its own options
|
||||||
m_screen->resetOptions();
|
m_screen->resetOptions();
|
||||||
}
|
}
|
||||||
|
|
@ -271,13 +256,8 @@ void
|
||||||
Screen::setOptions(const OptionsList& options)
|
Screen::setOptions(const OptionsList& options)
|
||||||
{
|
{
|
||||||
// update options
|
// update options
|
||||||
bool oldScreenSaverSync = m_screenSaverSync;
|
|
||||||
for (UInt32 i = 0, n = (UInt32)options.size(); i < n; i += 2) {
|
for (UInt32 i = 0, n = (UInt32)options.size(); i < n; i += 2) {
|
||||||
if (options[i] == kOptionScreenSaverSync) {
|
if (options[i] == kOptionHalfDuplexCapsLock) {
|
||||||
m_screenSaverSync = (options[i + 1] != 0);
|
|
||||||
LOG((CLOG_DEBUG1 "screen saver synchronization %s", m_screenSaverSync ? "on" : "off"));
|
|
||||||
}
|
|
||||||
else if (options[i] == kOptionHalfDuplexCapsLock) {
|
|
||||||
if (options[i + 1] != 0) {
|
if (options[i + 1] != 0) {
|
||||||
m_halfDuplex |= KeyModifierCapsLock;
|
m_halfDuplex |= KeyModifierCapsLock;
|
||||||
}
|
}
|
||||||
|
|
@ -309,16 +289,6 @@ Screen::setOptions(const OptionsList& options)
|
||||||
// update half-duplex options
|
// update half-duplex options
|
||||||
m_screen->setHalfDuplexMask(m_halfDuplex);
|
m_screen->setHalfDuplexMask(m_halfDuplex);
|
||||||
|
|
||||||
// update screen saver synchronization
|
|
||||||
if (!m_isPrimary && oldScreenSaverSync != m_screenSaverSync) {
|
|
||||||
if (m_screenSaverSync) {
|
|
||||||
m_screen->openScreensaver(false);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
m_screen->closeScreensaver();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// let screen handle its own options
|
// let screen handle its own options
|
||||||
m_screen->setOptions(options);
|
m_screen->setOptions(options);
|
||||||
}
|
}
|
||||||
|
|
@ -508,10 +478,6 @@ Screen::enableSecondary()
|
||||||
grabClipboard(id);
|
grabClipboard(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
// disable the screen saver if synchronization is enabled
|
|
||||||
if (m_screenSaverSync) {
|
|
||||||
m_screen->openScreensaver(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,7 @@ public:
|
||||||
Forcibly activates the screen saver if \c activate is true otherwise
|
Forcibly activates the screen saver if \c activate is true otherwise
|
||||||
forcibly deactivates it.
|
forcibly deactivates it.
|
||||||
*/
|
*/
|
||||||
void screensaver(bool activate);
|
void screensaver(bool activate) const;
|
||||||
|
|
||||||
//! Notify of key press
|
//! Notify of key press
|
||||||
/*!
|
/*!
|
||||||
|
|
@ -331,9 +331,6 @@ private:
|
||||||
// true if the cursor is on this screen
|
// true if the cursor is on this screen
|
||||||
bool m_entered;
|
bool m_entered;
|
||||||
|
|
||||||
// true if screen saver should be synchronized to server
|
|
||||||
bool m_screenSaverSync;
|
|
||||||
|
|
||||||
// note toggle keys that toggles on up/down (false) or on
|
// note toggle keys that toggles on up/down (false) or on
|
||||||
// transition (true)
|
// transition (true)
|
||||||
KeyModifierMask m_halfDuplex;
|
KeyModifierMask m_halfDuplex;
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,6 @@ static const OptionID kOptionScreenSwitchTwoTap = OPTION_CODE("SSTT");
|
||||||
static const OptionID kOptionScreenSwitchNeedsShift = OPTION_CODE("SSNS");
|
static const OptionID kOptionScreenSwitchNeedsShift = OPTION_CODE("SSNS");
|
||||||
static const OptionID kOptionScreenSwitchNeedsControl = OPTION_CODE("SSNC");
|
static const OptionID kOptionScreenSwitchNeedsControl = OPTION_CODE("SSNC");
|
||||||
static const OptionID kOptionScreenSwitchNeedsAlt = OPTION_CODE("SSNA");
|
static const OptionID kOptionScreenSwitchNeedsAlt = OPTION_CODE("SSNA");
|
||||||
static const OptionID kOptionScreenSaverSync = OPTION_CODE("SSVR");
|
|
||||||
static const OptionID kOptionXTestXineramaUnaware = OPTION_CODE("XTXU");
|
static const OptionID kOptionXTestXineramaUnaware = OPTION_CODE("XTXU");
|
||||||
static const OptionID kOptionScreenPreserveFocus = OPTION_CODE("SFOC");
|
static const OptionID kOptionScreenPreserveFocus = OPTION_CODE("SFOC");
|
||||||
static const OptionID kOptionRelativeMouseMoves = OPTION_CODE("MDLT");
|
static const OptionID kOptionRelativeMouseMoves = OPTION_CODE("MDLT");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue