parent
b6bc9202db
commit
d35716f574
15 changed files with 86 additions and 18 deletions
|
|
@ -141,6 +141,7 @@ block of a server config file as seen below. This section is used by the GUI to
|
||||||
[internalConfig]
|
[internalConfig]
|
||||||
clipboardSharing=true
|
clipboardSharing=true
|
||||||
clipboardSharingSize=@Variant(\0\0\0\x84\0\0\0\0\0\0<\0)
|
clipboardSharingSize=@Variant(\0\0\0\x84\0\0\0\0\0\0<\0)
|
||||||
|
defaultLockToScreenState=false
|
||||||
disableLockToScreen=false
|
disableLockToScreen=false
|
||||||
hasHeartbeat=false
|
hasHeartbeat=false
|
||||||
hasSwitchDelay=false
|
hasSwitchDelay=false
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,7 @@ 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");
|
||||||
static const OptionID kOptionWin32KeepForeground = OPTION_CODE("_KFW");
|
static const OptionID kOptionWin32KeepForeground = OPTION_CODE("_KFW");
|
||||||
|
static const OptionID kOptionDefaultLockToScreenState = OPTION_CODE("LTSS");
|
||||||
static const OptionID kOptionDisableLockToScreen = OPTION_CODE("DLTS");
|
static const OptionID kOptionDisableLockToScreen = OPTION_CODE("DLTS");
|
||||||
static const OptionID kOptionClipboardSharing = OPTION_CODE("CLPS");
|
static const OptionID kOptionClipboardSharing = OPTION_CODE("CLPS");
|
||||||
static const OptionID kOptionClipboardSharingSize = OPTION_CODE("CLSZ");
|
static const OptionID kOptionClipboardSharingSize = OPTION_CODE("CLSZ");
|
||||||
|
|
|
||||||
|
|
@ -53,23 +53,24 @@ bool ServerConfig::save(const QString &fileName) const
|
||||||
|
|
||||||
bool ServerConfig::operator==(const ServerConfig &sc) const
|
bool ServerConfig::operator==(const ServerConfig &sc) const
|
||||||
{
|
{
|
||||||
return m_Screens == sc.m_Screens && //
|
return m_Screens == sc.m_Screens && //
|
||||||
m_Columns == sc.m_Columns && //
|
m_Columns == sc.m_Columns && //
|
||||||
m_Rows == sc.m_Rows && //
|
m_Rows == sc.m_Rows && //
|
||||||
m_HasHeartbeat == sc.m_HasHeartbeat && //
|
m_HasHeartbeat == sc.m_HasHeartbeat && //
|
||||||
m_Heartbeat == sc.m_Heartbeat && //
|
m_Heartbeat == sc.m_Heartbeat && //
|
||||||
m_Protocol == sc.m_Protocol && //
|
m_Protocol == sc.m_Protocol && //
|
||||||
m_RelativeMouseMoves == sc.m_RelativeMouseMoves && //
|
m_RelativeMouseMoves == sc.m_RelativeMouseMoves && //
|
||||||
m_Win32KeepForeground == sc.m_Win32KeepForeground && //
|
m_Win32KeepForeground == sc.m_Win32KeepForeground && //
|
||||||
m_HasSwitchDelay == sc.m_HasSwitchDelay && //
|
m_HasSwitchDelay == sc.m_HasSwitchDelay && //
|
||||||
m_SwitchDelay == sc.m_SwitchDelay && //
|
m_SwitchDelay == sc.m_SwitchDelay && //
|
||||||
m_HasSwitchDoubleTap == sc.m_HasSwitchDoubleTap && //
|
m_HasSwitchDoubleTap == sc.m_HasSwitchDoubleTap && //
|
||||||
m_SwitchDoubleTap == sc.m_SwitchDoubleTap && //
|
m_SwitchDoubleTap == sc.m_SwitchDoubleTap && //
|
||||||
m_SwitchCornerSize == sc.m_SwitchCornerSize && //
|
m_SwitchCornerSize == sc.m_SwitchCornerSize && //
|
||||||
m_SwitchCorners == sc.m_SwitchCorners && //
|
m_SwitchCorners == sc.m_SwitchCorners && //
|
||||||
m_Hotkeys == sc.m_Hotkeys && //
|
m_Hotkeys == sc.m_Hotkeys && //
|
||||||
m_DisableLockToScreen == sc.m_DisableLockToScreen && //
|
m_DefaultLockToScreenState == sc.m_DefaultLockToScreenState && //
|
||||||
m_ClipboardSharing == sc.m_ClipboardSharing && //
|
m_DisableLockToScreen == sc.m_DisableLockToScreen && //
|
||||||
|
m_ClipboardSharing == sc.m_ClipboardSharing && //
|
||||||
m_ClipboardSharingSize == sc.m_ClipboardSharingSize;
|
m_ClipboardSharingSize == sc.m_ClipboardSharingSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -115,6 +116,7 @@ void ServerConfig::commit()
|
||||||
settings().setValue("hasSwitchDoubleTap", hasSwitchDoubleTap());
|
settings().setValue("hasSwitchDoubleTap", hasSwitchDoubleTap());
|
||||||
settings().setValue("switchDoubleTap", switchDoubleTap());
|
settings().setValue("switchDoubleTap", switchDoubleTap());
|
||||||
settings().setValue("switchCornerSize", switchCornerSize());
|
settings().setValue("switchCornerSize", switchCornerSize());
|
||||||
|
settings().setValue("defaultLockToScreenState", defaultLockToScreenState());
|
||||||
settings().setValue("disableLockToScreen", disableLockToScreen());
|
settings().setValue("disableLockToScreen", disableLockToScreen());
|
||||||
settings().setValue("clipboardSharing", clipboardSharing());
|
settings().setValue("clipboardSharing", clipboardSharing());
|
||||||
settings().setValue("clipboardSharingSize", QVariant::fromValue(clipboardSharingSize()));
|
settings().setValue("clipboardSharingSize", QVariant::fromValue(clipboardSharingSize()));
|
||||||
|
|
@ -166,6 +168,7 @@ void ServerConfig::recall()
|
||||||
haveSwitchDoubleTap(settings().value("hasSwitchDoubleTap", false).toBool());
|
haveSwitchDoubleTap(settings().value("hasSwitchDoubleTap", false).toBool());
|
||||||
setSwitchDoubleTap(settings().value("switchDoubleTap", 250).toInt());
|
setSwitchDoubleTap(settings().value("switchDoubleTap", 250).toInt());
|
||||||
setSwitchCornerSize(settings().value("switchCornerSize").toInt());
|
setSwitchCornerSize(settings().value("switchCornerSize").toInt());
|
||||||
|
setDefaultLockToScreenState(settings().value("defaultLockToScreenState", false).toBool());
|
||||||
setDisableLockToScreen(settings().value("disableLockToScreen", false).toBool());
|
setDisableLockToScreen(settings().value("disableLockToScreen", false).toBool());
|
||||||
setClipboardSharingSize(
|
setClipboardSharingSize(
|
||||||
settings().value("clipboardSharingSize", (int)ServerConfig::defaultClipboardSharingSize()).toULongLong()
|
settings().value("clipboardSharingSize", (int)ServerConfig::defaultClipboardSharingSize()).toULongLong()
|
||||||
|
|
@ -270,6 +273,8 @@ QTextStream &operator<<(QTextStream &outStream, const ServerConfig &config)
|
||||||
<< "relativeMouseMoves = " << (config.relativeMouseMoves() ? "true" : "false") << Qt::endl;
|
<< "relativeMouseMoves = " << (config.relativeMouseMoves() ? "true" : "false") << Qt::endl;
|
||||||
outStream << "\t"
|
outStream << "\t"
|
||||||
<< "win32KeepForeground = " << (config.win32KeepForeground() ? "true" : "false") << Qt::endl;
|
<< "win32KeepForeground = " << (config.win32KeepForeground() ? "true" : "false") << Qt::endl;
|
||||||
|
outStream << "\t"
|
||||||
|
<< "defaultLockToScreenState = " << (config.defaultLockToScreenState() ? "true" : "false") << Qt::endl;
|
||||||
outStream << "\t"
|
outStream << "\t"
|
||||||
<< "disableLockToScreen = " << (config.disableLockToScreen() ? "true" : "false") << Qt::endl;
|
<< "disableLockToScreen = " << (config.disableLockToScreen() ? "true" : "false") << Qt::endl;
|
||||||
outStream << "\t"
|
outStream << "\t"
|
||||||
|
|
|
||||||
|
|
@ -113,6 +113,10 @@ public:
|
||||||
{
|
{
|
||||||
return m_Hotkeys;
|
return m_Hotkeys;
|
||||||
}
|
}
|
||||||
|
bool defaultLockToScreenState() const
|
||||||
|
{
|
||||||
|
return m_DefaultLockToScreenState;
|
||||||
|
}
|
||||||
bool disableLockToScreen() const
|
bool disableLockToScreen() const
|
||||||
{
|
{
|
||||||
return m_DisableLockToScreen;
|
return m_DisableLockToScreen;
|
||||||
|
|
@ -214,6 +218,10 @@ private:
|
||||||
{
|
{
|
||||||
m_SwitchCornerSize = val;
|
m_SwitchCornerSize = val;
|
||||||
}
|
}
|
||||||
|
void setDefaultLockToScreenState(bool on)
|
||||||
|
{
|
||||||
|
m_DefaultLockToScreenState = on;
|
||||||
|
}
|
||||||
void setDisableLockToScreen(bool on)
|
void setDisableLockToScreen(bool on)
|
||||||
{
|
{
|
||||||
m_DisableLockToScreen = on;
|
m_DisableLockToScreen = on;
|
||||||
|
|
@ -248,6 +256,7 @@ private:
|
||||||
bool m_HasSwitchDoubleTap = false;
|
bool m_HasSwitchDoubleTap = false;
|
||||||
int m_SwitchDoubleTap = 0;
|
int m_SwitchDoubleTap = 0;
|
||||||
int m_SwitchCornerSize = 0;
|
int m_SwitchCornerSize = 0;
|
||||||
|
bool m_DefaultLockToScreenState = false;
|
||||||
bool m_DisableLockToScreen = false;
|
bool m_DisableLockToScreen = false;
|
||||||
bool m_ClipboardSharing = true;
|
bool m_ClipboardSharing = true;
|
||||||
QString m_ClientAddress = "";
|
QString m_ClientAddress = "";
|
||||||
|
|
|
||||||
|
|
@ -137,6 +137,11 @@ ServerConfigDialog::ServerConfigDialog(QWidget *parent, ServerConfig &config)
|
||||||
|
|
||||||
ui->sbSwitchCornerSize->setValue(serverConfig().switchCornerSize());
|
ui->sbSwitchCornerSize->setValue(serverConfig().switchCornerSize());
|
||||||
|
|
||||||
|
ui->cbDefaultLockToScreenState->setChecked(serverConfig().defaultLockToScreenState());
|
||||||
|
connect(
|
||||||
|
ui->cbDefaultLockToScreenState, &QCheckBox::toggled, this, &ServerConfigDialog::toggleDefaultLockToScreenState
|
||||||
|
);
|
||||||
|
|
||||||
ui->cbDisableLockToScreen->setChecked(serverConfig().disableLockToScreen());
|
ui->cbDisableLockToScreen->setChecked(serverConfig().disableLockToScreen());
|
||||||
connect(ui->cbDisableLockToScreen, &QCheckBox::toggled, this, &ServerConfigDialog::toggleLockToScreen);
|
connect(ui->cbDisableLockToScreen, &QCheckBox::toggled, this, &ServerConfigDialog::toggleLockToScreen);
|
||||||
|
|
||||||
|
|
@ -427,6 +432,12 @@ void ServerConfigDialog::setSwitchDelay(int delay)
|
||||||
onChange();
|
onChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ServerConfigDialog::toggleDefaultLockToScreenState(bool state)
|
||||||
|
{
|
||||||
|
serverConfig().setDefaultLockToScreenState(state);
|
||||||
|
onChange();
|
||||||
|
}
|
||||||
|
|
||||||
void ServerConfigDialog::toggleLockToScreen(bool disabled)
|
void ServerConfigDialog::toggleLockToScreen(bool disabled)
|
||||||
{
|
{
|
||||||
serverConfig().setDisableLockToScreen(disabled);
|
serverConfig().setDisableLockToScreen(disabled);
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,7 @@ protected:
|
||||||
void toggleSwitchDelay(bool enable);
|
void toggleSwitchDelay(bool enable);
|
||||||
void setSwitchDelay(int delay);
|
void setSwitchDelay(int delay);
|
||||||
|
|
||||||
|
void toggleDefaultLockToScreenState(bool state);
|
||||||
void toggleLockToScreen(bool disabled);
|
void toggleLockToScreen(bool disabled);
|
||||||
void toggleWin32Foreground(bool enabled);
|
void toggleWin32Foreground(bool enabled);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -434,6 +434,13 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="cbDefaultLockToScreenState">
|
||||||
|
<property name="text">
|
||||||
|
<string>Enable lock to computer at startup</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="cbRelativeMouseMoves">
|
<widget class="QCheckBox" name="cbRelativeMouseMoves">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
|
|
|
||||||
|
|
@ -671,6 +671,8 @@ void Config::readSectionOptions(ConfigReadContext &s)
|
||||||
addOption("", kOptionRelativeMouseMoves, s.parseBoolean(value));
|
addOption("", kOptionRelativeMouseMoves, s.parseBoolean(value));
|
||||||
} else if (name == "win32KeepForeground") {
|
} else if (name == "win32KeepForeground") {
|
||||||
addOption("", kOptionWin32KeepForeground, s.parseBoolean(value));
|
addOption("", kOptionWin32KeepForeground, s.parseBoolean(value));
|
||||||
|
} else if (name == "defaultLockToScreenState") {
|
||||||
|
addOption("", kOptionDefaultLockToScreenState, s.parseBoolean(value));
|
||||||
} else if (name == "disableLockToScreen") {
|
} else if (name == "disableLockToScreen") {
|
||||||
addOption("", kOptionDisableLockToScreen, s.parseBoolean(value));
|
addOption("", kOptionDisableLockToScreen, s.parseBoolean(value));
|
||||||
} else if (name == "clipboardSharing") {
|
} else if (name == "clipboardSharing") {
|
||||||
|
|
@ -1249,6 +1251,9 @@ const char *Config::getOptionName(OptionID id)
|
||||||
if (id == kOptionScreenPreserveFocus) {
|
if (id == kOptionScreenPreserveFocus) {
|
||||||
return "preserveFocus";
|
return "preserveFocus";
|
||||||
}
|
}
|
||||||
|
if (id == kOptionDefaultLockToScreenState) {
|
||||||
|
return "defaultLockToScreenState";
|
||||||
|
}
|
||||||
if (id == kOptionDisableLockToScreen) {
|
if (id == kOptionDisableLockToScreen) {
|
||||||
return "disableLockToScreen";
|
return "disableLockToScreen";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -134,6 +134,9 @@ Server::Server(ServerConfig &config, PrimaryClient *primaryClient, deskflow::Scr
|
||||||
if (!m_disableLockToScreen && (m_primaryClient->getToggleMask() & KeyModifierScrollLock)) {
|
if (!m_disableLockToScreen && (m_primaryClient->getToggleMask() & KeyModifierScrollLock)) {
|
||||||
LOG_NOTE("scroll lock is on, locking cursor to screen");
|
LOG_NOTE("scroll lock is on, locking cursor to screen");
|
||||||
m_lockedToScreen = true;
|
m_lockedToScreen = true;
|
||||||
|
} else if (m_defaultLockToScreenState) {
|
||||||
|
LOG_NOTE("default screen lock is on, locking cursor to screen");
|
||||||
|
m_lockedToScreen = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -337,7 +340,9 @@ bool Server::isLockedToScreen() const
|
||||||
|
|
||||||
// locked if we say we're locked
|
// locked if we say we're locked
|
||||||
if (isLockedToScreenServer()) {
|
if (isLockedToScreenServer()) {
|
||||||
LOG_NOTE("cursor is locked to screen, check scroll lock key");
|
if (!m_defaultLockToScreenState) {
|
||||||
|
LOG_NOTE("cursor is locked to screen, check scroll lock key");
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1098,6 +1103,8 @@ void Server::processOptions()
|
||||||
m_switchNeedsAlt = (value != 0);
|
m_switchNeedsAlt = (value != 0);
|
||||||
} else if (id == kOptionRelativeMouseMoves) {
|
} else if (id == kOptionRelativeMouseMoves) {
|
||||||
newRelativeMoves = (value != 0);
|
newRelativeMoves = (value != 0);
|
||||||
|
} else if (id == kOptionDefaultLockToScreenState) {
|
||||||
|
m_defaultLockToScreenState = (value != 0);
|
||||||
} else if (id == kOptionDisableLockToScreen) {
|
} else if (id == kOptionDisableLockToScreen) {
|
||||||
m_disableLockToScreen = (value != 0);
|
m_disableLockToScreen = (value != 0);
|
||||||
} else if (id == kOptionClipboardSharing) {
|
} else if (id == kOptionClipboardSharing) {
|
||||||
|
|
|
||||||
|
|
@ -450,6 +450,7 @@ private:
|
||||||
// screen locking (former scroll lock)
|
// screen locking (former scroll lock)
|
||||||
bool m_lockedToScreen = false;
|
bool m_lockedToScreen = false;
|
||||||
|
|
||||||
|
bool m_defaultLockToScreenState = false;
|
||||||
bool m_disableLockToScreen = false;
|
bool m_disableLockToScreen = false;
|
||||||
bool m_enableClipboard = true;
|
bool m_enableClipboard = true;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1060,6 +1060,10 @@ Al habilitar esta opción, se deshabilitará la interfaz gráfica de usuario (GU
|
||||||
<source>Browse for a config file</source>
|
<source>Browse for a config file</source>
|
||||||
<translation type="unfinished">Busque un archivo de configuración</translation>
|
<translation type="unfinished">Busque un archivo de configuración</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Enable lock to computer at startup</source>
|
||||||
|
<translation type="unfinished">Activar el bloqueo del ordenador al iniciar</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>SettingsDialog</name>
|
<name>SettingsDialog</name>
|
||||||
|
|
|
||||||
|
|
@ -1060,6 +1060,10 @@ L'abilitazione di questa impostazione disabiliterà l'interfaccia graf
|
||||||
<source>Browse for a config file</source>
|
<source>Browse for a config file</source>
|
||||||
<translation>Cerca un file di configurazione</translation>
|
<translation>Cerca un file di configurazione</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Enable lock to computer at startup</source>
|
||||||
|
<translation type="unfinished">Abilita il blocco al computer all'avvio</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>SettingsDialog</name>
|
<name>SettingsDialog</name>
|
||||||
|
|
|
||||||
|
|
@ -1061,6 +1061,10 @@ Enabling this setting will disable the server config GUI.</source>
|
||||||
<source>Browse for a config file</source>
|
<source>Browse for a config file</source>
|
||||||
<translation>設定ファイルを選択</translation>
|
<translation>設定ファイルを選択</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Enable lock to computer at startup</source>
|
||||||
|
<translation>起動時にコンピューター間移動のロックを有効にする</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>SettingsDialog</name>
|
<name>SettingsDialog</name>
|
||||||
|
|
|
||||||
|
|
@ -1064,6 +1064,10 @@ Enabling this setting will disable the server config GUI.</source>
|
||||||
<source>Browse for a config file</source>
|
<source>Browse for a config file</source>
|
||||||
<translation>Выбрать файл для конфигурации</translation>
|
<translation>Выбрать файл для конфигурации</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Enable lock to computer at startup</source>
|
||||||
|
<translation type="unfinished">Включить блокировку компьютера при запуске</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>SettingsDialog</name>
|
<name>SettingsDialog</name>
|
||||||
|
|
|
||||||
|
|
@ -1061,6 +1061,10 @@ Enabling this setting will disable the server config GUI.</source>
|
||||||
<source>Browse for a config file</source>
|
<source>Browse for a config file</source>
|
||||||
<translation>浏览配置文件</translation>
|
<translation>浏览配置文件</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Enable lock to computer at startup</source>
|
||||||
|
<translation type="unfinished">启动时启用锁定到计算机</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>SettingsDialog</name>
|
<name>SettingsDialog</name>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue