diff options
| author | 2015-10-21 20:42:39 +0000 | |
|---|---|---|
| committer | 2015-10-21 20:42:39 +0000 | |
| commit | 516dd36e7425856e810c6fc7a506c3ac22492dc1 (patch) | |
| tree | 5214541a32d25090b30e74809e8804b6579ca862 | |
| parent | 5ec7420ecd0e94be0a07fc77b0bc950deb0178fd (diff) | |
| parent | 1ee48c4f4b756b08b4bad41910c1053323e3d445 (diff) | |
Merge "Make stack crop be aware of the big surface during resizing."
| -rw-r--r-- | services/core/java/com/android/server/wm/WindowStateAnimator.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/wm/WindowStateAnimator.java b/services/core/java/com/android/server/wm/WindowStateAnimator.java index ee7c88a90ae1..ecc1f2c16598 100644 --- a/services/core/java/com/android/server/wm/WindowStateAnimator.java +++ b/services/core/java/com/android/server/wm/WindowStateAnimator.java @@ -1431,8 +1431,14 @@ class WindowStateAnimator { if (appToken != null && appToken.mCropWindowsToStack && !appToken.mReplacingWindow) { TaskStack stack = w.getTask().mStack; stack.getBounds(mTmpStackBounds); - final int frameX = w.mFrame.left + mWin.mXOffset - w.getAttrs().surfaceInsets.left; - final int frameY = w.mFrame.top + mWin.mYOffset - w.getAttrs().surfaceInsets.top; + // When we resize we use the big surface approach, which means we can't trust the + // 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 // relative to the inside of the surface, but the stack bounds aren't. clipRect.left = Math.max(0, |