Bug 429678 - Windows are repositioned incorrectly when vertically-arranged second screen is unplugged
Summary: Windows are repositioned incorrectly when vertically-arranged second screen i...
Status: REOPENED
Alias: None
Product: kwin
Classification: Plasma
Component: multi-screen (show other bugs)
Version: 5.20.3
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: multiscreen
Depends on:
Blocks:
 
Reported: 2020-11-26 09:50 UTC by Riccardo Robecchi
Modified: 2023-09-06 16:52 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Riccardo Robecchi 2020-11-26 09:50:18 UTC
SUMMARY
I use my laptop with a docking station, connected to an external screen. This screen is set in System Settings to be above the laptop one. When I unplug the docking station, however, windows are repositioned vertically so that those that were on the laptop's screen are moved down and become cut in half. I have then to manually bring them all up again to their previous position.

STEPS TO REPRODUCE
1. use a two-screen setup in which one screen is on top of the other
2. unplug the second screen 

OBSERVED RESULT
Windows are moved to the bottom of the first screen, often ending up cut in half.

EXPECTED RESULT
Windows stay where they are if they are already on the first screen.

SOFTWARE/OS VERSIONS
Linux: KDE Neon Focal 
KDE Plasma Version: 5.20.3
KDE Frameworks Version: 5.76.0
Qt Version: 5.15.1

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2021-10-06 19:23:23 UTC

*** This bug has been marked as a duplicate of bug 369130 ***
Comment 2 Riccardo Robecchi 2023-09-06 10:52:04 UTC
Reopening this as this doesn't actually seem like they are related. Bug 369130 deals with the fact that some GPUs and/or screens mark a screen as detached when it goes to sleep, with the consequence that the system places windows on the remaining screen. My case is different.

I use my laptop with a docking station, connected to an external screen. This screen is set in System Settings to be above the laptop one. When I unplug the docking station, however, what I see is that windows *on the laptop's screen* are moved, even though they shouldn't as the geometry of that screen hasn't changed (obviously). Interestingly enough, it looks like KScreen moves the external screen from above the laptop's to its right hand side before the removal, so the effect is that windows are all shifted laterally and are often placed half outside the visible area.
The point is then not that the windows are on the incorrect screen, as is the case in the other bug, but that they are placed incorrectly on the existing one.