Bug 378138 - KWin open some windows on first monitor, not primary
Summary: KWin open some windows on first monitor, not primary
Status: RESOLVED NOT A BUG
Alias: None
Product: kwin
Classification: Plasma
Component: core (show other bugs)
Version: 5.9.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-27 07:38 UTC by Ural
Modified: 2017-04-03 15:44 UTC (History)
0 users

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


Attachments
xprop + xwininfo (46.87 KB, text/plain)
2017-04-02 18:17 UTC, Ural
Details
xprop + xwininfo of main qbittorrent window, which is on another monitor (46.56 KB, text/plain)
2017-04-02 18:20 UTC, Ural
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ural 2017-03-27 07:38:15 UTC
Hello. I have 4 monitors in one row. The 'primary' is defined third, default panel is here. In general, everything is working well, but some apps ALWAYS opening it's windows and popups on first monitor, which is in long distance from me. That's very annoying. 

Steps to reproduce:
1. Define primary monitor to be second+ in the row
2. Open qBittorrent. It will open on first monitor. Even if you move it to second, new popup windows, like 'Add torrent' will ALWAYS open on first monitor, not primary.

There are some other apps acting like this, but qBittorrent is great example and it always work such way.

Please help.
Comment 1 Martin Flöser 2017-04-02 15:58:09 UTC
Please provide output of xprop and xwininfo of affected windows
Comment 2 Ural 2017-04-02 18:17:49 UTC
Created attachment 104849 [details]
xprop + xwininfo

I opened qBittorrent on my primary monitor, and then clicked a torrent file in dolphin. 'Add torrent ' was opened on first monitor, not primary. I have attached xprop + xwininfo of this 'Add torrent' window
Comment 3 Ural 2017-04-02 18:20:24 UTC
Created attachment 104850 [details]
xprop + xwininfo of main qbittorrent window, which is on another monitor
Comment 4 Martin Flöser 2017-04-02 19:38:04 UTC
It is like I expected: the window asked for this position. You can see in the output you attached a "user specified location".

According to ICCCM the window manager is obliged to honour this. You can use a window specific rule to override it.

But it also means that we do not have a bug in the window manager here. KWin behaves exactly as expected from the spec.
Comment 5 Ural 2017-04-03 05:26:17 UTC
Sorry, can you explain more please? I don't know the spec, but as a user, my first monitor is 30 meters far away from me, and 20-30% apps are opening on it, and it is very annoying. This monitor is for public video rotating. I don't want any windows to open on it. I even put some option to open windows on that screen, where mouse is. It didn't helped. 
I can't override all applications, I don't know which new application will open in such way. 
Why then there is 'primary' definition? it is just for panel? Primary monitor must be first for all windows. 
I am sure that's not normal behaviour for usability. Mostly all popups and confirmations opens on first monitor.
Comment 6 Martin Flöser 2017-04-03 14:52:14 UTC
I'm sorry, but we also cannot do anything for the applications. What you report is a common complain - we get this quite often. But we are bound to the spec. If we would break it other things would break. The relevant section of the spec is: https://tronche.com/gui/x/icccm/sec-4.html#s-4.1.2.3

It is clearly an application bug to say it's a "user specified" position when it is clearly not. It should be program specified, that would allow us to ignore it.

The primary display is in fact only intended for panels. It is not even used by the window managers. Applications are not supposed to interpret this.
Comment 7 Ural 2017-04-03 15:44:58 UTC
Thanks for the info. I know KWin is very configurable, can I configure it in the way I need? It open new windows in center of first screen, if they are 'user specified', can I override this somehow? Really, many many apps do this, even if the main window located on another screen. Maybe I can define some rule for all apps that have 'user specified' position... I can't believe Kwin can't do this. I even found 'focus stealing prevention' when I needed this, and it was surprise for me that such setting exist.