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

Commit 9ca40b7a authored by Filip Gruszczynski's avatar Filip Gruszczynski
Browse files

Apply window position translation after app transforms.

If this translation is applied prematurely and the app transform
includes scaling, this translation will be affected and as a result it
will move the window.

Change-Id: Iaf7d104708f0775384495e42dbd82cb9ae03b8f7
parent 35b5fe25
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1090,7 +1090,6 @@ class WindowStateAnimator {
            if (selfTransformation) {
                tmpMatrix.postConcat(mTransformation.getMatrix());
            }
            tmpMatrix.postTranslate(frame.left + mWin.mXOffset, frame.top + mWin.mYOffset);
            if (attachedTransformation != null) {
                tmpMatrix.postConcat(attachedTransformation.getMatrix());
            }
@@ -1100,6 +1099,10 @@ class WindowStateAnimator {
            if (screenAnimation) {
                tmpMatrix.postConcat(screenRotationAnimation.getEnterTransformation().getMatrix());
            }
            // The translation that applies the position of the window needs to be applied at the
            // end in case that other translations include scaling. Otherwise the scaling will
            // affect this translation.
            tmpMatrix.postTranslate(frame.left + mWin.mXOffset, frame.top + mWin.mYOffset);

            //TODO (multidisplay): Magnification is supported only for the default display.
            if (mService.mAccessibilityController != null && displayId == Display.DEFAULT_DISPLAY) {