Bug 489488

Summary: Maximized window restored to the wrong monitor
Product: [Plasma] kwin Reporter: Edoardo Lolletti <edoardo762>
Component: multi-screenAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: nate
Priority: NOR Keywords: multiscreen
Version: 6.1.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 6.2.0
Sentry Crash Report:

Description Edoardo Lolletti 2024-06-30 11:24:15 UTC
STEPS TO REPRODUCE
1. have a non maximized window on a monitor
2. Drag the window on another monitor, and snap it to the top of the screen so that it is maximized
3. Restore the window either with double clicking the title bar, pressing the window button, or keyboard combination

OBSERVED RESULT
The window is restored in the exact size and location it was dragged from the first time, thus in the wrong monitor
EXPECTED RESULT
The window is restored in the monitor it is currently in with the original dimensions

ADDITIONAL INFORMATION
This worked as expected in plasma 5.27 and 6.0, happens on both x11 and wayland
Comment 1 Bug Janitor Service 2024-09-17 14:39:08 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/6404
Comment 2 Zamundaaa 2024-09-20 17:08:04 UTC
Git commit dadf3f3a9774e930a50d002bb9f0daf2a806ac40 by Xaver Hugl.
Committed on 20/09/2024 at 16:58.
Pushed by zamundaaa into branch 'master'.

window: move geometry restore to new output on electric border maximize

Otherwise, unmaximizing the window will move it to a different screen than it's
currently on, which is confusing

M  +3    -2    autotests/integration/quick_tiling_test.cpp
M  +3    -0    src/window.cpp

https://invent.kde.org/plasma/kwin/-/commit/dadf3f3a9774e930a50d002bb9f0daf2a806ac40
Comment 3 Zamundaaa 2024-09-20 17:31:07 UTC
Git commit b48581379322d33cf57c4e4510049a49f85e10cc by Xaver Hugl.
Committed on 20/09/2024 at 17:13.
Pushed by zamundaaa into branch 'Plasma/6.2'.

window: move geometry restore to new output on electric border maximize

Otherwise, unmaximizing the window will move it to a different screen than it's
currently on, which is confusing


(cherry picked from commit dadf3f3a9774e930a50d002bb9f0daf2a806ac40)

Co-authored-by: Xaver Hugl <xaver.hugl@gmail.com>

M  +3    -2    autotests/integration/quick_tiling_test.cpp
M  +3    -0    src/window.cpp

https://invent.kde.org/plasma/kwin/-/commit/b48581379322d33cf57c4e4510049a49f85e10cc