Skip to content

Only precompute the geometry restore when m_interactiveMoveResize.initialQuickTileMode is None

Liu Jie requested to merge kylinliujie/kwin:work/quick_tile into master

If the user wants to move a tiled window but changes their mind and tiles the window back to the previous position, quickTileGeometryRestore() will return an error value beacause m_electricMaximizing is true and the m_electricGeometryRestore is the same as the geometry of the window in the last tiled mode.

Now the geometry restore of the tiled window is true when starting interactive move, so we no longer need to precompute it.

Changes for testQuickTilingPointerMove:

We need to attach a new image after the tiling window, so that updateElectricGeometryRestore can obtain the same framegeometry as the framegeometry obtained during actual runtime.

Now testQuickTilingPointerMove can detect the error:If the user wants to move a tiled window but changes their mind and tiles the window back to the previous position, quickTileGeometryRestore() will return an error value beacause m_electricMaximizing is true and the m_electricGeometryRestore is the same as thegeometry of the window in the last tiled mode.

Signed-off-by: Jie Liu liujie01@kylinos.cn

Edited by Liu Jie

Merge request reports