SUMMARY Move mouse to focus, using the default shortcut Meta+F5 focuses the top left corner of the screen where the mouse is on a 3 monitor setup. STEPS TO REPRODUCE 1. Use Switch To Next Screen shortcut to focus a window on monitor 1 from monitor 0 2. A window on monitor 1 is successfully focused, the cursor stays on monitor 0 3. Press the shortcut for Move Mouse to Focus (Meta + F5) or a custom shortcut OBSERVED RESULT The cursor moves to the top left corner of monitor 0, focus remains unchanged. EXPECTED RESULT Mouse cursor moves to the center of the window of monitor 1, where the focus is. SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: 5.20.5 KDE Frameworks Version: 5.78.0 Qt Version: 5.15.2 ADDITIONAL INFORMATION The output of kscreen doctor: Output: 33 XWAYLAND0 enabled connected Unknown Modes: 38:1920x1080@60*! Geometry: 4480,360 1920x1080 Scale: 1 Rotation: 1 Output: 35 XWAYLAND1 enabled connected Unknown Modes: 38:1920x1080@60*! Geometry: 0,360 1920x1080 Scale: 1 Rotation: 1 Output: 37 XWAYLAND2 enabled connected primary Unknown Modes: 39:2560x1440@60*! Geometry: 1920,0 2560x1440 Scale: 1 Rotation: 1 primary It seems that the problem persists through all sorts of applications I've tested: - 2 instances of Konsole on different monitors - 2 instances of Alacritty on different monitors - Brave-Browser and a KDE settings window Also I should mention that I haven't tested this on Xorg. I cannot confirm this is a Wayland only bug, or a new bug of any sort. I found out about the capability earlier today.
I see a similar behaviour on X11 as well so it doesn't look like a Wayland regression.
I did some research on this 1. "Move Mouse to Focus", as well as "Move Mouse To Center", are still a part of the Zoom effect. So "Move Mouse To Center" doesn't work with the "Zoom" effect disabled. However, the former KWin maintainer previously announced the intention to move both actions to the KWin core (https://invent.kde.org/plasma/kwin/-/commit/80bd289e065634cd034e69325c0cc15bf5b5e7de , "Better names for global shortcuts in Zoom Effect"), 2. "Move Mouse to Focus" somehow depends on the "focusPoint" which calculation was changed a few years ago (https://invent.kde.org/plasma/kwin/-/commit/c1ea0412a45a64d99c120eedfa80ef376c7e6610 , "[effects/zoom] Implement focus tracking with QAccessibilityClient"). 3. I've also tried Kubuntu 14.04.5 live USB (with KDE SC 4.13) but unfortunately haven't figured out how to get the "Move Mouse to Focus" action to work. --- Conclusions: 1. "Move Mouse To Center" action still works well on both X11 and Wayland and doesn't seem to have a direct connection to the Zoom effect, so probably can be moved to the KWin core. 2. "Move Mouse to Focus" action seems broken even on the KDE SC 4.13, and if someone is going to fix or re-implement it, please make it independent of the "Zoom" effect's "Focus Tracking".
I can confirm that the bug also shows up on X11 (kwin 5.27.9 on Manjaro).
Created attachment 163558 [details] Unofficial patch for KWin 5.27
Created attachment 163559 [details] Unofficial patch for KWin 5.80 (Plasma 6 Alpha)
Created attachment 165807 [details] Demo of the "move window" workaround From https://invent.kde.org/plasma/kwin/-/merge_requests/4721 I've learned that at least for now "Move Mouse to Focus" might work for some applications under X11 session. For now, users can try to use "Move Window" shortcut as a more universal workaround. 1. Assign some keyboard shortcut (e.g. Meta+Ctrl+w) for the "Move Window" action. it can be set at "System Settings" > "Keyboard" > "Shortcuts" > "KWin" 2. Use keyboard only (don't use mouse or touchpad) while performing further steps 3. With Alt+Tab or Meta+Number switch to the window where you want to place cursor 4. Press "Move Window" shortcut 5. Cursor will move to the center of the active window 6. Press "Esc" key to cancel "Move window" action. Cursor will stay in the center of the active window. I'm attaching screencast that shows this workaround in action.
https://bugs.kde.org/show_bug.cgi?id=493217 is the same bug and it was lately resolved in 6.2.0. The fix works only on Wayland. Hope support will be extended to X11 (I wasn't able to use Focus tracking with accessibility API there) *** This bug has been marked as a duplicate of bug 493217 ***
Your report was earlier than mine, despite that yours is duplicate... Anyways, thank you for the patch.