Tile to top maximizes on wrong monitor
Submitted by Pim Pronk
Assigned to Olivier Fourdan @olivier
Description
I have a tripple monitor setup as follows, it consists of one screen in Portrait mode, then one in Landscape and then another monitor in Portrait mode:
xrandr --listmonitors
Monitors: 3 0: +*HDMI-A-0 1920/518x1200/324+1080+480 HDMI-A-0 1: +HDMI-A-1 1080/527x1920/297+0+271 HDMI-A-1 2: +DVI-D-0 1050/408x1680/306+3000+0 DVI-D-0
When I drag a window from a large monitor to a smaller monitor and drag that window e.g. to the top border of monitor 0 to TILE_UP, sometimes the window is maximised on monitor 1 instead of monitor 0. But when I tile to a corner, the window is always displayed on monitor 0.
I believe this is because in moveresize.c:clientMoveTile all TILE_'s are done by calling clientTile directly while passing xevent->x,y but TILE_UP is triggered by calling clientToggleMaximized without passing xevent->x,y information. And as clientToggleMaximized always finds the current monitor by looking at the center point of the window, it could be that with dragging windows from a big to a smaller monitor that center point is not on the same monitor as the mouse is.
Before I write a patch, would you consider this a bug or a feature?
As a patch i think you would need to pass (optionally?) the 'current' x,y variables to clientToggleMaximized so it will only use the center point of the window if there is no x,y available.
Version: 4.12.0