Bug 446291

Summary: Window position changes after plugging in external monitor
Product: [Plasma] kwin Reporter: Charles Beauville <accounts>
Component: multi-screenAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal Keywords: multiscreen
Priority: NOR    
Version First Reported In: 5.23.3   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Relevant log lines when I plug my external monitor
Opened window before plugging the external monitor
Opened window after plugging in the external monitor

Description Charles Beauville 2021-11-30 17:24:45 UTC
Created attachment 144091 [details]
Relevant log  lines when I plug my external monitor

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Linux: 5.12.2-2-MANJARO (64-bit)
(available in About System)
KDE Plasma Version: 5.23.3
KDE Frameworks Version: 5.88.0
Qt Version: 5.12.2

ADDITIONAL INFORMATION
Comment 1 Charles Beauville 2021-11-30 17:38:43 UTC
SUMMARY
It's been a few days now that I've had this issue, basically when I plug my external monitor (which becomes the primary display to the left of my laptop, at the same resolution), my open windows keep the same size but their positions go to x=0 for the external monitor and to the top right corner for the laptop screen.
Even when I set some window rules to force the x and y positions of the windows, this still happens.
I have tried switching the primary display, still the same problem (except now the window moves to the right edge of the laptop screen)

STEPS TO REPRODUCE
1. Have a window opened
2. Plug external monitor

OBSERVED RESULT
Opened window gets shifted to the left edge of the screen (for the external monitor).
If the window was on the laptop screen, it gets shifted to the top right of it.

EXPECTED RESULT
The windows should stay in the center of the screen, in the same position as before.
Comment 2 Charles Beauville 2021-11-30 17:41:02 UTC
Created attachment 144093 [details]
Opened window before plugging the external monitor
Comment 3 Charles Beauville 2021-11-30 17:41:27 UTC
Created attachment 144094 [details]
Opened window after plugging in the external monitor
Comment 4 Charles Beauville 2021-11-30 17:43:57 UTC
Note that this happens whether "Window Placement" is set as "Minimal Overlap" or as "Center".
Comment 5 Vlad Zahorodnii 2023-01-19 11:58:02 UTC
Should be fixed in 5.26