Bug 471342

Summary: Sudden window displacement when dragging a window to de-maximize
Product: [Plasma] kwin Reporter: bugs.7ng0x
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: bugseforuns
Priority: NOR    
Version: 5.27.5   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:

Description bugs.7ng0x 2023-06-22 15:09:36 UTC
SUMMARY
When de-maximizing ("restoring") windows by dragging their title bar, the window position will suddenly snap depending on where it was dragged from. Specifically, after dragging past the threshold that triggers de-maximizing, the top-left corner of the window snaps to the mouse cursor.

This happens exclusively on Wayland, and only when the application was launched in maximized state.

STEPS TO REPRODUCE
0. Run KWin on Wayland
1. Start Konsole in maximized state (i.e. if needed, restart Konsole after maximizing its window)
2. De-maximize the window by dragging down with the mouse *from the right half of the title bar*

(This happens for any other application too)

OBSERVED RESULT
The top-left window corner snaps to the mouse cursor position. This *only* happens if the application started maximized, and then it happens repeatedly until the window is once de-maximized using another method (e.g. double-clicking the title bar).

EXPECTED RESULT
The relative position of the window and the mouse shouldn't change. This is required to uphold the illusion that the user is shifting the window around with their hand.

SOFTWARE/OS VERSIONS
Linux: openSUSE Tumbleweed (also tested Ubuntu 23.04)
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.105.0
Qt Version: 5.15.9
Graphics Platform: Wayland
Comment 1 Patrick Silva 2023-06-23 07:59:33 UTC

*** This bug has been marked as a duplicate of bug 449105 ***