Wrong position for new client when dragging a maximised tab to a new window
Submitted by Pim Pronk
Assigned to Olivier Fourdan @olivier
Description
I have a multiple monitor setup as follows:
$ xrandr --listmonitors
Monitors: 3
0: +*DisplayPort-0 1920/518x1200/324+1080+480 DisplayPort-0
1: +HDMI-A-0 1080/527x1920/297+0+284 HDMI-A-0
2: +DVI-D-0 1050/408x1680/306+3000+0 DVI-D-0
It seems there are a couple of prerequisites required to trigger this bug:
- You need an application that supports dragging tab's to new window's. I use Chromium as an example.
- Chromium needs to have a default position on e.g. mon2 (as in when you click the application launcher it opens on mon2).
- Not fully sure about this yet, but it could be that the default position should also be in a maximised state (as after clicking on the applicatoin launcher it opens maximised on mon2)
- Then drag Chromium to the top of mon0 to maximize it on mon0
- Make sure Chromium has at least two tabs, so one Chromium window with 2 tabs
Now when you drag one of the tabs away (so you have 2 windows each with 1 tab), the new window is positioned on mon2 instead of mon0. This results in a confusing experience because your mouse is still on mon0 and there is an offset between your mouse movements and the movements of your new window.
Maybe the following observation is related. If instead you drag the whole window (so instead of one tab to create a new window you drag the window with 2 tabs) the window loses its maximised state and returns to its original size under the current mouse position on mon0. But for a very brief moment just after dragging the window from the top of mon0 the window is positioned on mon2 as well (before being placed on mon0). This behaviour is not always visible as this happens really quick (eg you will only see a quick flickering on mon2).
Currently I am looking at clientInitPosition as the possible culprit, but I will have to add some more debug information first and will come back on this.
Version: 4.12.0