Skip to content

window: reimplement restriction in moveResize

Yifan Zhu requested to merge work/fanzhuyifan/restriction into master

In restricted moveResize, try to guarantee at least a 100px contiguous block of the titlebar is visible. Previously this was implemented by shifting the geometry by 1px increments, trying to find a suitable position. This is inefficient and error-prone.

Replace this with an efficient algorithm that finds the closest candidate position. Consolidate the restriction code and add tests.

BUG: 481610

One remaining issues is that in multi-monitor setups, workspace()->restrictedMoveArea() does not include the invisible area caused by the misalignment of the screens.

Edited by Yifan Zhu

Merge request reports