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

Commit 4158a67a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix child windows of windows with surface insets"

parents aa3f4cad 50d3f8f4
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -4443,8 +4443,12 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        if (isChildWindow()) {
            // TODO: This probably falls apart at some point and we should
            // actually compute relative coordinates.

            // Since the parent was outset by its surface insets, we need to undo the outsetting
            // with insetting by the same amount.
            final WindowState parent = getParentWindow();
            outPoint.offset(-parent.mFrame.left, -parent.mFrame.top);
            outPoint.offset(-parent.mFrame.left + parent.mAttrs.surfaceInsets.left,
                    -parent.mFrame.top + parent.mAttrs.surfaceInsets.top);
        } else if (parentWindowContainer != null) {
            final Rect parentBounds = parentWindowContainer.getBounds();
            outPoint.offset(-parentBounds.left, -parentBounds.top);