Bug 468177

Summary: Window left outside remaining screen area after disconnecting monitor
Product: [Plasma] kwin Reporter: Andreas Nordal <andreas_nordal_4>
Component: multi-screenAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: nate
Priority: NOR    
Version: 5.27.3   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Andreas Nordal 2023-04-05 16:50:10 UTC
SUMMARY
I have a laptop with a FHD screen and a separate 4K monitor. I have set the laptop screen to turn off when connected to the monitor, so in my case, the screen area halves in width and height when disconnecting the monitor. So far so good.

I like to work with Konsole on the left half of the screen and Kate on the right.
When I disconnect, only Konsole remains visible, and the minimize animation reveals that Kate is exactly outside the remaining screen area. In this state, Kate is unreachable: I can't move it into the remaining screen area, because I can't grab it, because the mouse pointer won't go there. Thankfully, I can F11-fullscreen it and save my work. But there is no way I can get the window inside the remaining screen area again other than restarting it.

STEPS TO REPRODUCE
1. Have 2 screens of different width connected in the mode where the small screen shows the upper left pixels of the big one or is off.
2. Drag a window into the right desktop edge, so it snaps into exactly the right half of the screen.
3. Disconnect the big screen.

OBSERVED RESULT
The window that I snapped to the right side of the screen is left outside the remaining screen area.

EXPECTED RESULT
The window that I snapped to the right side of the screen is somewhere on the right side of the screen.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20230331
KDE Plasma Version: 5.27.3
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8
Kernel Version: 6.2.8-1-default (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i5-8265U CPU @ 1.60GHz
Memory: 15.4 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620
Manufacturer: HP
Product Name: HP EliteBook 840 G6

ADDITIONAL INFORMATION
Reproducibility: 10/10

The phenomenon happens only in width, not height: If I put Konsole in the lower left quadrant before disconnecting, I still see Konsole in the lower left quadrant.
Comment 1 Nate Graham 2023-04-06 17:16:27 UTC

*** This bug has been marked as a duplicate of bug 452118 ***