#6346 Make server bypass lock to screen if it's disable from config option
# Conflicts: # src/lib/server/Server.cpp # src/lib/server/Server.h
This commit is contained in:
parent
535627c871
commit
84dfeec2ed
|
@ -765,10 +765,12 @@ Config::readSectionOptions(ConfigReadContext& s)
|
|||
else if (name == "win32KeepForeground") {
|
||||
addOption("", kOptionWin32KeepForeground, s.parseBoolean(value));
|
||||
}
|
||||
else if (name == "disableLockToScreen") {
|
||||
addOption("", kOptionDisableLockToScreen, s.parseBoolean(value));
|
||||
}
|
||||
else if (name == "clipboardSharing") {
|
||||
addOption("", kOptionClipboardSharing, s.parseBoolean(value));
|
||||
}
|
||||
|
||||
else {
|
||||
handled = false;
|
||||
}
|
||||
|
@ -1380,6 +1382,9 @@ Config::getOptionName(OptionID id)
|
|||
if (id == kOptionScreenPreserveFocus) {
|
||||
return "preserveFocus";
|
||||
}
|
||||
if (id == kOptionDisableLockToScreen) {
|
||||
return "disableLockToScreen";
|
||||
}
|
||||
if (id == kOptionClipboardSharing) {
|
||||
return "clipboardSharing";
|
||||
}
|
||||
|
|
|
@ -92,6 +92,7 @@ Server::Server(
|
|||
m_sendFileThread(NULL),
|
||||
m_writeToDropDirThread(NULL),
|
||||
m_ignoreFileTransfer(false),
|
||||
m_disableLockToScreen(false),
|
||||
m_enableClipboard(true),
|
||||
m_sendDragInfoThread(NULL),
|
||||
m_waitDragInfoThread(true),
|
||||
|
@ -421,6 +422,10 @@ Server::isLockedToScreenServer() const
|
|||
bool
|
||||
Server::isLockedToScreen() const
|
||||
{
|
||||
if (m_disableLockToScreen) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// locked if we say we're locked
|
||||
if (isLockedToScreenServer()) {
|
||||
LOG((CLOG_NOTE "Cursor is locked to screen, check Scroll Lock key"));
|
||||
|
@ -1177,6 +1182,9 @@ Server::processOptions()
|
|||
else if (id == kOptionRelativeMouseMoves) {
|
||||
newRelativeMoves = (value != 0);
|
||||
}
|
||||
else if (id == kOptionDisableLockToScreen) {
|
||||
m_disableLockToScreen = true;
|
||||
}
|
||||
else if (id == kOptionClipboardSharing) {
|
||||
m_enableClipboard = (value != 0);
|
||||
|
||||
|
|
|
@ -473,6 +473,7 @@ private:
|
|||
Thread* m_writeToDropDirThread;
|
||||
String m_dragFileExt;
|
||||
bool m_ignoreFileTransfer;
|
||||
bool m_disableLockToScreen;
|
||||
bool m_enableClipboard;
|
||||
|
||||
Thread* m_sendDragInfoThread;
|
||||
|
|
|
@ -67,6 +67,7 @@ static const OptionID kOptionXTestXineramaUnaware = OPTION_CODE("XTXU"
|
|||
static const OptionID kOptionScreenPreserveFocus = OPTION_CODE("SFOC");
|
||||
static const OptionID kOptionRelativeMouseMoves = OPTION_CODE("MDLT");
|
||||
static const OptionID kOptionWin32KeepForeground = OPTION_CODE("_KFW");
|
||||
static const OptionID kOptionDisableLockToScreen = OPTION_CODE("DLTS");
|
||||
static const OptionID kOptionClipboardSharing = OPTION_CODE("CLPS");
|
||||
//@}
|
||||
|
||||
|
|
Loading…
Reference in New Issue