diff --git a/src/gui/src/BaseConfig.cpp b/src/gui/src/BaseConfig.cpp index 36fe4307..241f590a 100644 --- a/src/gui/src/BaseConfig.cpp +++ b/src/gui/src/BaseConfig.cpp @@ -33,7 +33,8 @@ const char* BaseConfig::m_FixNames[] = "halfDuplexCapsLock", "halfDuplexNumLock", "halfDuplexScrollLock", - "xtestIsXineramaUnaware" + "xtestIsXineramaUnaware", + "preserveFocus" }; const char* BaseConfig::m_SwitchCornerNames[] = diff --git a/src/gui/src/BaseConfig.h b/src/gui/src/BaseConfig.h index f1769bbb..2a34969f 100644 --- a/src/gui/src/BaseConfig.h +++ b/src/gui/src/BaseConfig.h @@ -29,7 +29,7 @@ class BaseConfig public: enum Modifier { DefaultMod = -1, Shift, Ctrl, Alt, Meta, Super, None, NumModifiers }; enum SwitchCorner { TopLeft, TopRight, BottomLeft, BottomRight, NumSwitchCorners }; - enum Fix { CapsLock, NumLock, ScrollLock, XTest, NumFixes }; + enum Fix { CapsLock, NumLock, ScrollLock, XTest, PreserveFocus, NumFixes }; protected: BaseConfig() {} diff --git a/src/gui/src/ScreenSettingsDialog.cpp b/src/gui/src/ScreenSettingsDialog.cpp index 4f294e24..3023b6d4 100644 --- a/src/gui/src/ScreenSettingsDialog.cpp +++ b/src/gui/src/ScreenSettingsDialog.cpp @@ -68,6 +68,7 @@ ScreenSettingsDialog::ScreenSettingsDialog(QWidget* parent, Screen* pScreen) : m_pCheckBoxNumLock->setChecked(m_pScreen->fix(Screen::NumLock)); m_pCheckBoxScrollLock->setChecked(m_pScreen->fix(Screen::ScrollLock)); m_pCheckBoxXTest->setChecked(m_pScreen->fix(Screen::XTest)); + m_pCheckBoxPreserveFocus->setChecked(m_pScreen->fix(Screen::PreserveFocus)); } void ScreenSettingsDialog::accept() @@ -115,6 +116,7 @@ void ScreenSettingsDialog::accept() m_pScreen->setFix(Screen::NumLock, m_pCheckBoxNumLock->isChecked()); m_pScreen->setFix(Screen::ScrollLock, m_pCheckBoxScrollLock->isChecked()); m_pScreen->setFix(Screen::XTest, m_pCheckBoxXTest->isChecked()); + m_pScreen->setFix(Screen::PreserveFocus, m_pCheckBoxPreserveFocus->isChecked()); QDialog::accept(); } diff --git a/src/gui/src/ScreenSettingsDialogBase.ui b/src/gui/src/ScreenSettingsDialogBase.ui index 0d6d7689..992919dd 100644 --- a/src/gui/src/ScreenSettingsDialogBase.ui +++ b/src/gui/src/ScreenSettingsDialogBase.ui @@ -462,7 +462,17 @@ - + + + + Fix Preserve Focus + + + false + + + + Qt::Vertical