Bug 378896 - Enabling a secondary Monitor left of the Primary moves all windows
Summary: Enabling a secondary Monitor left of the Primary moves all windows
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: multi-screen (show other bugs)
Version: 5.9.4
Platform: Arch Linux Linux
: HI normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: usability
: 418470 430005 431533 434970 439366 441169 451057 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-04-18 01:12 UTC by evea
Modified: 2022-09-16 17:28 UTC (History)
15 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.26


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description evea 2017-04-18 01:12:50 UTC
When enabling a secondary monitor, which is located left of the primary, all windows are moved to the secondary monitor, this includes dockers liker Plank.

No matter if you use the system settings, Meta+p or xrandr.
Comment 1 Sebastian Kügler 2017-04-19 08:40:53 UTC
Thanks for the report.

Window placement is the sole responsibility of KWin, so I'll reassign it to kwin.
Comment 2 Martin Flöser 2017-04-19 14:21:51 UTC
Adding a screen changes the virtual layout. Windows are placed on positions in the virtual layout - e.g. at 0/0. By adding a screen left to the existing a new screen is put to the position 0/0.

Unfortunately we cannot read the users mind and don't know whether the user expects windows to stay at 0/0 or to move to another screen.
Comment 3 evea 2017-04-19 17:48:25 UTC
No need to read the users mind. Just like in every other scenario the user would want his windows to stay on the Primary screen. If the coordinates of the primary screen change, window positions should be updated too. This is expected behavior.

Resolved invalid? is that a bad joke or something?
Comment 4 Nate Graham 2021-03-10 22:53:55 UTC

*** This bug has been marked as a duplicate of bug 427875 ***
Comment 5 Nate Graham 2021-08-19 19:35:39 UTC
*** Bug 441169 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2021-08-19 19:35:57 UTC
*** Bug 418470 has been marked as a duplicate of this bug. ***
Comment 7 Nate Graham 2021-08-19 19:36:37 UTC
*** Bug 430005 has been marked as a duplicate of this bug. ***
Comment 8 Nate Graham 2021-08-19 19:36:40 UTC
*** Bug 431533 has been marked as a duplicate of this bug. ***
Comment 9 Nate Graham 2021-08-19 19:36:44 UTC
*** Bug 434970 has been marked as a duplicate of this bug. ***
Comment 10 Nate Graham 2021-08-19 19:36:48 UTC
*** Bug 439366 has been marked as a duplicate of this bug. ***
Comment 11 Nate Graham 2021-09-27 19:53:58 UTC
*** Bug 442953 has been marked as a duplicate of this bug. ***
Comment 12 Vlad Zahorodnii 2021-10-30 14:02:57 UTC
Git commit 4928f4db5b810969c70d549729c23ff95d1a6781 by Vlad Zahorodnii.
Committed on 30/10/2021 at 14:02.
Pushed by vladz into branch 'master'.

Try to preserve window position relative to their outputs during hotplug

Currently, if an output is hotplugged, all windows will be scrambled,
which is highly annoying.

With this change, windows will stick to their outputs if an output has
been connected or disconnected.
Related: bug 296673, bug 412703, bug 443698

M  +10   -12   src/abstract_client.cpp

https://invent.kde.org/plasma/kwin/commit/4928f4db5b810969c70d549729c23ff95d1a6781
Comment 13 Nate Graham 2022-04-06 18:52:04 UTC
*** Bug 451057 has been marked as a duplicate of this bug. ***
Comment 14 Nate Graham 2022-04-06 18:52:36 UTC
Got another report of this issue (Bug 451057) from someone using Plasma 5.24.2; re-opening.
Comment 15 Lach Sławomir 2022-05-23 13:38:32 UTC
In Plasma 5.25 problem still exist. I have additional problem, because Plasma's windows moving. I could life with it, if Plasma's windows will restore one's position after screen disconnection.
Comment 16 Phil O 2022-07-30 22:48:06 UTC
In my case, I have a secondary monitor which I don't regularly power up unless I have a video to watch.  All is well until the primary monitor goes to sleep or is powered off.  When awoken, all my windows have moved over to the (not powered on) secondary monitor.  Quite annoying to move them all back.
Comment 17 Nate Graham 2022-09-03 18:14:00 UTC
This should have been fixed by https://invent.kde.org/plasma/kwin/-/merge_requests/2573 in Plasma 5.26!
Comment 18 Phil O 2022-09-04 03:11:46 UTC
Does that commit also fix bug 356225?
Comment 19 Nate Graham 2022-09-08 04:15:40 UTC
No, I'm afraid KWin isn't responsible for Panel positioning--Plasma is. So a different fix will be needed.