Bug 405428 - Secondary monitor positioned to right acts as a primary monitor (windows positions are not remembered either)
Summary: Secondary monitor positioned to right acts as a primary monitor (windows posi...
Status: RESOLVED NOT A BUG
Alias: None
Product: kwin
Classification: Plasma
Component: multi-screen (show other bugs)
Version: 5.14.3
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-13 12:57 UTC by leftcrane
Modified: 2019-03-13 17:48 UTC (History)
0 users

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 leftcrane 2019-03-13 12:57:59 UTC
Operating System: Kubuntu 18.10
KDE Plasma Version: 5.15.2
KDE Frameworks Version: 5.54.0
Qt Version: 5.11.1
Kernel Version: 4.18.0-16-generic
OS Type: 64-bit

Display server: X11

This occurs when you have two monitors connected to a laptop (screen inactive) and the right-hand one is primary. Once you disconnect the monitors and reconnect, windows start to appear on the left-hand monitor (even if the mouse is on the primary monitor). This goes for both windows that were already open, which get moved to the right-hand monitor and for some new windows.

This includes, notably, the full-screen program launcher. Even though its icon is located on the right screen, the launcher opens on the left after disconnect/reconnect. The same is true for many other programs, with the exception of the latest KDE and Gnome software. They get launched on the secondary monitor.

Window positions aren't being remembered either - they always go to the non-primary monitor on the left, for most programs. Interestingly, latte panels from the left secondary monitor shift to the right upon disconnecting the secondary monitor.

I can't tell if this is due to the latest KDE upgrade or due to me having switched my secondary monitor from right to left side a week ago.


(I have active screen follows mouse enabled).

I realize that is is not an exhaustive or terribly clear summary of the bug, but please be on the lookout for it. It's extremely annoying. I am not sure I can document this much further. It's a complex bug and I have a solution that works well enough for me: I just have a hotkey that restarts KWin, Latte, and Plasma every time I disconnect/reconnect monitors.

Luckily KDE perfromance is good enough to permit this workaround.
Comment 1 leftcrane 2019-03-13 13:05:47 UTC
I'll just add that some apps appear confused about the primary monitor while others (like inkscape opening a file) actively want to appear on the right-hand secondary monitor. (for these latter apps, I have a KWin rule to force them to the primary screen).
Comment 2 leftcrane 2019-03-13 15:28:56 UTC
I mean secondary monitor positioned to the LEFT (not the right)

Anyway, I discovered this was intended behavior. https://www.reddit.com/r/kde/comments/6yeru6/connect_2nd_monitor_kwin_moves_all_open_windows/

I really hate this. Couldn't you declare the upper left corner of the primary monitor to always be the origin of the coordinate system? I don't remember this being an issue on Mutter.
Comment 3 leftcrane 2019-03-13 15:32:48 UTC
OK, KWin is feature frozen, so the workaround for this issue becomes:

- Ship a KWin script to move all windows to primary monitor. Maybe have this script (optionally) fire when a secondary monitor is reconnected.
Comment 4 Martin Flöser 2019-03-13 17:48:59 UTC
This is a very common misunderstanding: primary display setting has no influence on window position. Most windows position themselves and the remaining ones are positioned based on the active screen.