From d0c4aeeb08f3530c71bfe207e9c82699ca74d4e0 Mon Sep 17 00:00:00 2001 From: Xaver Hugl Date: Mon, 24 Jun 2024 21:51:22 +0200 Subject: [PATCH] options: enable separate screen focus by default When the user closes the active window, with separate screen focus disabled, a window on the other screen might get activated, which also switches the active screen to the other one. As this is quite unintuitive, and in my testing having separate screen focus enabled didn't have any other unintuitive side effects, this commit enables separate screen focus by default --- autotests/integration/lockscreen.cpp | 1 + src/kcms/options/kwinoptions_settings.kcfg | 2 +- src/kwin.kcfg | 2 +- src/options.cpp | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/autotests/integration/lockscreen.cpp b/autotests/integration/lockscreen.cpp index 4f3917d31d..3be42c666a 100644 --- a/autotests/integration/lockscreen.cpp +++ b/autotests/integration/lockscreen.cpp @@ -211,6 +211,7 @@ void LockScreenTest::init() workspace()->setActiveOutput(QPoint(640, 512)); input()->pointer()->warp(QPoint(640, 512)); + options->setSeparateScreenFocus(false); } void LockScreenTest::cleanup() diff --git a/src/kcms/options/kwinoptions_settings.kcfg b/src/kcms/options/kwinoptions_settings.kcfg index 48aacd84b8..7132caa3d2 100644 --- a/src/kcms/options/kwinoptions_settings.kcfg +++ b/src/kcms/options/kwinoptions_settings.kcfg @@ -132,7 +132,7 @@ - false + true diff --git a/src/kwin.kcfg b/src/kwin.kcfg index 86636127ed..ec0e656b5f 100644 --- a/src/kwin.kcfg +++ b/src/kwin.kcfg @@ -98,7 +98,7 @@ false - false + true false diff --git a/src/options.cpp b/src/options.cpp index 340733b2f6..84614eb51f 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -40,7 +40,7 @@ Options::Options(QObject *parent) , m_delayFocusInterval(0) , m_shadeHover(false) , m_shadeHoverInterval(0) - , m_separateScreenFocus(false) + , m_separateScreenFocus(true) , m_placement(PlacementNone) , m_activationDesktopPolicy(Options::defaultActivationDesktopPolicy()) , m_borderSnapZone(0)