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

Commit 516dd36e authored by Filip Gruszczynski's avatar Filip Gruszczynski Committed by Android (Google) Code Review
Browse files

Merge "Make stack crop be aware of the big surface during resizing."

parents 5ec7420e 1ee48c4f
Loading
Loading
Loading
Loading
+8 −2
Original line number Original line Diff line number Diff line
@@ -1431,8 +1431,14 @@ class WindowStateAnimator {
        if (appToken != null && appToken.mCropWindowsToStack && !appToken.mReplacingWindow) {
        if (appToken != null && appToken.mCropWindowsToStack && !appToken.mReplacingWindow) {
            TaskStack stack = w.getTask().mStack;
            TaskStack stack = w.getTask().mStack;
            stack.getBounds(mTmpStackBounds);
            stack.getBounds(mTmpStackBounds);
            final int frameX = w.mFrame.left + mWin.mXOffset - w.getAttrs().surfaceInsets.left;
            // When we resize we use the big surface approach, which means we can't trust the
            final int frameY = w.mFrame.top + mWin.mYOffset - w.getAttrs().surfaceInsets.top;
            // window frame bounds anymore. Instead, the window will be placed at 0, 0, but to avoid
            // hardcoding it, we use surface coordinates.
            final boolean isResizing = w.isDragResizing();
            final int frameX = isResizing ? (int) mSurfaceX :
                    w.mFrame.left + mWin.mXOffset - w.getAttrs().surfaceInsets.left;
            final int frameY = isResizing ? (int) mSurfaceY :
                    w.mFrame.top + mWin.mYOffset - w.getAttrs().surfaceInsets.top;
            // We need to do some acrobatics with surface position, because their clip region is
            // We need to do some acrobatics with surface position, because their clip region is
            // relative to the inside of the surface, but the stack bounds aren't.
            // relative to the inside of the surface, but the stack bounds aren't.
            clipRect.left = Math.max(0,
            clipRect.left = Math.max(0,