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

Commit 70f59488 authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Fix bounds calculation

Don't include the wallpaper window when calculating the frame
in multi-window.

Test: Go multi-window, go recents.
Change-Id: I8b4fb48767d6bdbda055d9c631811ad5a1dcaee6
Fixes: 36240988
parent eb59d6e9
Loading
Loading
Loading
Loading
+22 −20
Original line number Diff line number Diff line
@@ -2948,7 +2948,8 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
                }

                // Don't include wallpaper in bounds calculation
                if (!mutableIncludeFullDisplay.value && includeDecor) {
                if (!w.mIsWallpaper && !mutableIncludeFullDisplay.value) {
                    if (includeDecor) {
                        final TaskStack stack = w.getStack();
                        if (stack != null) {
                            stack.getBounds(frame);
@@ -2957,7 +2958,7 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
                        // We want to screenshot with the exact bounds of the surface of the app. Thus,
                        // intersect it with the frame.
                        frame.intersect(w.mFrame);
                }else if (!mutableIncludeFullDisplay.value && !w.mIsWallpaper) {
                    } else {
                        final Rect wf = w.mFrame;
                        final Rect cr = w.mContentInsets;
                        int left = wf.left + cr.left;
@@ -2971,6 +2972,7 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
                            frame.setEmpty();
                        }
                    }
                }

                final boolean foundTargetWs =
                        (w.mAppToken != null && w.mAppToken.token == appToken)