Bug 424389 - Regression in "active screen follows mouse"
Summary: Regression in "active screen follows mouse"
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: git master
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2020-07-18 22:00 UTC by Siddhartha
Modified: 2020-07-23 00:22 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.19.4
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Siddhartha 2020-07-18 22:00:50 UTC
SUMMARY
New windows do not spawn on the screen which has the mouse, but instead spawns on the screen which contains the active window.

STEPS TO REPRODUCE
1. Start plasma on > 1 screens. All screens have their own plasma panel with application menu.
2. Make sure "Active screen follows mouse" is ON in "Window management" in settings.
2. Start Dolphin on Screen 1 and make sure it is active.
3. Start another instance of Dolphin on Screen 2.

OBSERVED RESULT
Second instance of Dolphin starts on Screen 1.

EXPECTED RESULT
Second instance of Dolphin starts on Screen 2 which has the mouse.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.19.80 (kwin-git r18148.cf2712887)
KDE Frameworks Version: 5.73.0 (git master)
Qt Version: 5.15.0
Kernel Version: 5.7.9-arch1-1

ADDITIONAL INFORMATION
This used to work before, and is a recent regression sometime in the last 2-4 weeks.
Comment 1 jukuc 2020-07-21 08:27:07 UTC
Would you mind attaching the output of "qdbus org.kde.KWin /KWin supportInformation"?  If I'd guessed correctly you should see "Active screen follows mouse: no" under the section "Screens".

In that case, a work around for this problem is to run:
kwriteconfig5 --file ~/.config/kwinrc --group Windows --key ActiveMouseScreen "true"
Comment 2 Siddhartha 2020-07-21 11:16:45 UTC
Thanks jukuc!

That is correct. I see "Active screen follows mouse:  no". So this is a regression in the kwin kcm, because it shows the option set to ON there?

I'll use the workaround meanwhile (it works!).

Do you still need the full support output?
Comment 3 jukuc 2020-07-21 21:07:29 UTC
No need for now since it seems like we've found the culprit :)

Playing around with an older version of plasma desktop on Manjaro KDE minimal 20.0.3 live USB, I observed the following behavior that was different:

- setting "Active screen follows mouse" under settings modules would remove the key "ActiveMouseScreen" in ~/.config/kwinrc, whereas it would change the key to the value "true" in older version of Plasma desktop.

FYI of my setup:
Operating System: Manjaro Linux
KDE Plasma Version: 5.19.3
KDE Frameworks Version: 5.72.0
Qt Version: 5.15.0
Kernel Version: 5.7.9-1-MANJARO

Live usb:
Operating System: Manjaro Linux 
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.70.0
Qt Version: 5.14.2
Kernel Version: 5.6.15-1-MANJARO
Comment 4 Siddhartha 2020-07-22 00:06:29 UTC
Yes, that is what I found as well. Fiddling with the settings removes the entry when I set the option to ON. Manually setting the entry to "true" in the config file and restarting kwin is a workaround.
Comment 5 jukuc 2020-07-22 00:47:17 UTC
I forgot to mention to also run this command after kwriteconfig5:
qdbus org.kde.KWin /KWin reconfigure

This would save you the effort of restarting kwin.
Comment 6 Bug Janitor Service 2020-07-22 09:26:28 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/130
Comment 7 Cyril Rossi 2020-07-22 10:36:27 UTC
Git commit c853f8313a213a0f7d0f98f662f7e98849d547ca by Cyril Rossi.
Committed on 22/07/2020 at 10:33.
Pushed by crossi into branch 'Plasma/5.19'.

KCM KWin Options setting ActiveMouseScreen set proper default value

Fix regression that was introduced by a mismatch in the default value of
ActiveMouseScreen option between kwin.kcfg and kwinoptions_settings.kcfg

M  +1    -1    kcmkwin/kwinoptions/CMakeLists.txt
M  +1    -1    kcmkwin/kwinoptions/kwinoptions_settings.kcfg
M  +1    -0    kcmkwin/kwinoptions/kwinoptions_settings.kcfgc

https://invent.kde.org/plasma/kwin/commit/c853f8313a213a0f7d0f98f662f7e98849d547ca
Comment 8 Cyril Rossi 2020-07-22 10:37:33 UTC
Git commit 3609a029ea4001b9134784f95d92c8f99bf8ef05 by Cyril Rossi.
Committed on 22/07/2020 at 10:37.
Pushed by crossi into branch 'cherry-pick-c853f831'.

KCM KWin Options setting ActiveMouseScreen set proper default value

Fix regression that was introduced by a mismatch in the default value of
ActiveMouseScreen option between kwin.kcfg and kwinoptions_settings.kcfg


(cherry picked from commit c853f8313a213a0f7d0f98f662f7e98849d547ca)

M  +1    -1    kcmkwin/kwinoptions/CMakeLists.txt
M  +1    -1    kcmkwin/kwinoptions/kwinoptions_settings.kcfg
M  +1    -0    kcmkwin/kwinoptions/kwinoptions_settings.kcfgc

https://invent.kde.org/plasma/kwin/commit/3609a029ea4001b9134784f95d92c8f99bf8ef05