Bug 489488 - Maximized window restored to the wrong monitor
Summary: Maximized window restored to the wrong monitor
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: multi-screen (show other bugs)
Version: 6.1.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: multiscreen
Depends on:
Blocks:
 
Reported: 2024-06-30 11:24 UTC by Edoardo Lolletti
Modified: 2024-09-24 21:33 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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