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

Commit 4915f0b2 authored by Jerry Chang's avatar Jerry Chang
Browse files

Prevent setting position to a surface attached to leash

Make sure to only update surface position when it's not attached to
leash to prevent double offset the surface.

Fix: 232745449
Test: add log to verify taskbar won't disappear with the same flow in
      bug.
Change-Id: Ide9a2a5ebee40783620a14d7d7835cd87d892140
parent 4c2b5c84
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -809,7 +809,8 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
    };

    private final Consumer<SurfaceControl.Transaction> mSetSurfacePositionConsumer = t -> {
        if (mSurfaceControl != null && mSurfaceControl.isValid()) {
        // Only apply the position to the surface when there's no leash created.
        if (mSurfaceControl != null && mSurfaceControl.isValid() && !mSurfaceAnimator.hasLeash()) {
            t.setPosition(mSurfaceControl, mSurfacePosition.x, mSurfacePosition.y);
        }
    };