Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b133562b authored by Merissa Mitchell's avatar Merissa Mitchell Committed by Android (Google) Code Review
Browse files

Merge "[PiP on CD] Reduce overlap of drag region with PiP window." into main

parents eeb12cfb 07543dae
Loading
Loading
Loading
Loading
+11 −10
Original line number Diff line number Diff line
@@ -135,8 +135,9 @@ public class PipDragToResizeHandler {
    /**
     * Check whether the current x,y coordinate is within the region in which drag-resize should
     * start.
     * This consists of 4 small squares on the 4 corners of the PIP window, a quarter of which
     * overlaps with the PIP window while the rest goes outside of the PIP window.
     * This consists of 4 small squares on the 4 corners of the PIP window, 1/16th of which
     * overlaps with the PIP window (the overlap is not bigger so that the drag area doesn't overlap
     * with the PiP menu buttons) while the rest goes outside of the PIP window.
     * _ _           _ _
     * |_|_|_________|_|_|
     * |_|_|         |_|_|
@@ -152,14 +153,14 @@ public class PipDragToResizeHandler {
            return false;
        }
        resetDragCorners();
        mTmpTopLeftCorner.offset(currentPipBounds.left - mDelta / 2,
                currentPipBounds.top - mDelta / 2);
        mTmpTopRightCorner.offset(currentPipBounds.right - mDelta / 2,
                currentPipBounds.top - mDelta / 2);
        mTmpBottomLeftCorner.offset(currentPipBounds.left - mDelta / 2,
                currentPipBounds.bottom - mDelta / 2);
        mTmpBottomRightCorner.offset(currentPipBounds.right - mDelta / 2,
                currentPipBounds.bottom - mDelta / 2);
        mTmpTopLeftCorner.offset(currentPipBounds.left - mDelta * 3 / 4,
                currentPipBounds.top - mDelta * 3 / 4);
        mTmpTopRightCorner.offset(currentPipBounds.right - mDelta / 4,
                currentPipBounds.top - mDelta * 3 / 4);
        mTmpBottomLeftCorner.offset(currentPipBounds.left - mDelta * 3 / 4,
                currentPipBounds.bottom - mDelta / 4);
        mTmpBottomRightCorner.offset(currentPipBounds.right - mDelta / 4,
                currentPipBounds.bottom - mDelta / 4);

        mTmpRegion.setEmpty();
        mTmpRegion.op(mTmpTopLeftCorner, Region.Op.UNION);