834
834
pointerDx += xRoot - lastPointerX;
835
835
pointerDy += yRoot - lastPointerY;
838
/* If we hit the edge of the screen while resizing
839
* the window and the adjacent window edge has not hit
840
* the edge of the screen, then accumulate pointer motion
841
* in the opposite direction. (So the apparant x / y
842
* mixup here is intentional)
847
if (mask == ResizeLeftMask)
850
geometry.x - w->input ().left > grabWindowWorkArea->left ())
851
pointerDx += abs (yRoot - lastPointerY) * -1;
853
else if (mask == ResizeRightMask)
855
if (xRoot == screen->width () -1 &&
856
geometry.x + geometry.width + w->input ().right < grabWindowWorkArea->right ())
857
pointerDx += abs (yRoot - lastPointerY);
859
if (mask == ResizeUpMask)
862
geometry.y - w->input ().top > grabWindowWorkArea->top ())
863
pointerDy += abs (xRoot - lastPointerX) * -1;
865
else if (mask == ResizeDownMask)
867
if (yRoot == screen->height () -1 &&
868
geometry.y + geometry.height + w->input ().bottom < grabWindowWorkArea->bottom ())
869
pointerDx += abs (yRoot - lastPointerY);
839
874
if (mask & ResizeLeftMask)