placementtracker: fix tiled windows not being restored correctly
There were two problems for quick tiled windows:
- Workspace interacted with the tile mode of windows before inhibiting the placement tracker, so the wrong window state was stored in the placement tracker
- Window::setQuickTileMode is unintuitive and has some undesired side effects,
meant to handle quick tiling with keyboard shortcuts and by dragging the
window with a mouse specifically. This commit just works around that by
un-setting the tile mode first... a better fix can and should be done later (which would imo be to have this logic not in
setQuickTileMode
but in separate methods actually meant for the keyboard shortcuts and for electric quick tiling)
And two for custom tiled windows:
- The placement tracker didn't handle them correctly; now it sets the custom tile mode after moving the window to its location
- The window code used
output()
instead ofmoveResizeOutput()
, which means when KWin just moved the window to a different screen and immediately changes the tile mode afterwards, it would tile the window on the wrong output
This also adds an autotest for both cases