Port constraint constraints from Window::clientPos()

This commit is contained in:
Vlad Zahorodnii 2022-11-08 19:47:28 +02:00 committed by David Edmundson
parent 0ec732491b
commit f9abd04459

View file

@ -596,7 +596,7 @@ static QRegion getConstraintRegion(Window *window, T *constraint)
{
const QRegion windowShape = window->inputShape();
const QRegion intersected = constraint->region().isEmpty() ? windowShape : windowShape.intersected(constraint->region());
return intersected.translated(QPointF(window->pos() + window->clientPos()).toPoint());
return intersected.translated(window->mapFromLocal(QPointF(0, 0)).toPoint());
}
void PointerInputRedirection::setEnableConstraints(bool set)