Bug 481149

Summary: After using Kwin - Move Window keyboard shortcut causes cursor to be in the wrong position
Product: [Plasma] kwin Reporter: arcinthesky
Component: coreAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: fanzhuyifan
Priority: NOR    
Version First Reported In: 5.93.0   
Target Milestone: ---   
Platform: NixOS   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=478614
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description arcinthesky 2024-02-09 23:24:13 UTC
STEPS TO REPRODUCE
1. Trigger the keyboard shortcut to move a Window (for example, Dolphin or Firefox)
2. Move Window to any other spot on the desktop, and left click the mouse.
3. Now the window is in a new spot, move the mouse around and you will see it is pointing at things that are not under the cursor.

OBSERVED RESULT
Mouse cursor does not match the physical location within the window. In order to get your mouse back to be pointing at the correct spot of the Window, you have to move the cursor out of the window, and then move the mouse back into the window.

EXPECTED RESULT
Mouse cursor should be interacting with elements that are directly under the mouse cursor within the window.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: NixOS 24.05 (nixos-unstable)
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.114.0
Qt Version: 5.15.12

ADDITIONAL INFORMATION
This bug is also in Plasma 6 RC2.
Comment 1 fanzhuyifan 2024-02-10 00:54:52 UTC
Can reproduce on arch, source build from master, wayland. 

Note: this happens when the initial window isn't maximized.
Comment 2 fanzhuyifan 2024-02-19 01:33:54 UTC
The problem seems to be the surface getting a wl_pointer.enter event when the move starts. This does not happen when the window is moved by holding down meta and dragging.
Comment 3 Bug Janitor Service 2024-02-19 07:10:45 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/5230