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

Commit 0024a31d authored by tanxiaoyan's avatar tanxiaoyan
Browse files

Should update surface position of the window before report resize



Bug:359766320

Change-Id: I20b0440ad7195745cdf1ec2cb6164fea2b69654a
Signed-off-by: default avatartanxiaoyan <tanxiaoyan@xiaomi.com>
parent b90b46a5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -996,6 +996,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
                // complete configuration.
                continue;
            }
            win.updateSurfacePositionIfNeeded();
            win.reportResized();
            mWmService.mResizingWindows.remove(i);
        }
+8 −0
Original line number Diff line number Diff line
@@ -5190,6 +5190,14 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        super.prepareSurfaces();
    }

    void updateSurfacePositionIfNeeded() {
        if (mWindowFrames.mRelFrame.top == mWindowFrames.mLastRelFrame.top
                && mWindowFrames.mRelFrame.left == mWindowFrames.mLastRelFrame.left) {
            return;
        }
        updateSurfacePosition(getSyncTransaction());
    }

    @Override
    @VisibleForTesting
    void updateSurfacePosition(Transaction t) {