Skip to content

placementtracker: fix tiled windows not being restored correctly

Xaver Hugl requested to merge work/zamundaaa/test-tiled-restore into master

There were two problems for quick tiled windows:

  1. Workspace interacted with the tile mode of windows before inhibiting the placement tracker, so the wrong window state was stored in the placement tracker
  2. 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:

  1. The placement tracker didn't handle them correctly; now it sets the custom tile mode after moving the window to its location
  2. The window code used output() instead of moveResizeOutput(), 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

Merge request reports