Bug 431790 - Maximized windows switch to 2nd screen after it turns on
Summary: Maximized windows switch to 2nd screen after it turns on
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: git master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-18 16:58 UTC by Noah Davis
Modified: 2024-04-25 16:24 UTC (History)
1 user (show)

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


Attachments
My screen layout (11.91 KB, image/png)
2021-02-14 19:32 UTC, Noah Davis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Noah Davis 2021-01-18 16:58:04 UTC
SUMMARY
I have a laptop with a 2nd screen attached via HDMI. When the 2nd screen is turned on, all maximized windows switch to the 2nd screen. Minimized maximized windows also switch screens. Unmaximized windows do not switch screens.

STEPS TO REPRODUCE
1. Move all maximized windows to laptop screen
2. Turn 2nd screen off
3. Turn 2nd screen on

OBSERVED RESULT
All maximized windows switch to the 2nd screen

EXPECTED RESULT
Windows that were originally on the laptop screen should stay on the laptop screen when the 2nd screen is turned on

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20210114
KDE Plasma Version: 5.20.80
KDE Frameworks Version: 5.79.0
Qt Version: 5.15.2
Kernel Version: 5.10.7-1-default
OS Type: 64-bit
Processors: 16 × AMD Ryzen 7 4800H with Radeon Graphics
Memory: 30.8 GiB of RAM
Graphics:  Device-1: Advanced Micro Devices [AMD/ATI] Renoir driver: amdgpu v: kernel
           Device-2: Chicony HD Webcam type: USB driver: uvcvideo
           Display: x11 server: X.org 1.20.10 driver: amdgpu,ati unloaded: fbdev,modesetting,vesa
           resolution: <xdpyinfo missing>
           OpenGL: renderer: AMD RENOIR (DRM 3.40.0 5.10.7-1-default LLVM 11.0.0) v: 4.6 Mesa 20.3.2

ADDITIONAL INFORMATION
On my old laptop with an Intel i7-6500U with Intel HD Graphics 520, this did not happen. This could be caused by a recent change to KWin or the result of switching to new hardware.
Comment 1 Noah Davis 2021-01-18 17:00:14 UTC
> Minimized maximized windows also switch screens

I should also mention that even though they switch screens, they stay minimized, so you won't know that they've switched screens unless you unminimze them.
Comment 2 Noah Davis 2021-02-14 19:31:59 UTC
This appears to only happen if the laptop screen has its top left coordinate lower than the top left coordinate of the 2nd screen.

If the top left coordinate of the laptop screen is at the same level as the 2nd screen, then maximized windows move to the 1st screen, even if they're supposed to be on the 2nd screen. Effectively the opposite problem.
Comment 3 Noah Davis 2021-02-14 19:32:50 UTC
Created attachment 135686 [details]
My screen layout
Comment 4 Noah Davis 2021-04-02 00:13:59 UTC
For some reason, if plasmashell is dead, maximized windows move to the 1st screen instead.
Comment 5 David Edmundson 2024-04-25 14:07:00 UTC
This has had a lot of work over recent months, please confirm if an issue exists in Plasma 6.0
Comment 6 Noah Davis 2024-04-25 16:24:45 UTC
Seems to be fixed. When turning on the second screen, windows will redo their maximize animation twice, but that's a separate issue.