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

Commit bfbd9dc9 authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Fix screenshotting with includeDecor=true in multi-window

The old code wasn't really tested and stackBounds variable was
null in any case.

Test: Go to multi-window, go to recents, make sure screenshot is
correct.
Bug: 31339431

Change-Id: I721397800ba7519dba7f569461c5f339eba0591b
parent 7361babf
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -2252,10 +2252,11 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
                }

                // Don't include wallpaper in bounds calculation
                if (includeDecor && !stackBounds.isEmpty()) {
                    frame.set(stackBounds);
                } else if (includeDecor) {
                    mutableIncludeFullDisplay.value = true;
                if (!mutableIncludeFullDisplay.value && includeDecor) {
                    final TaskStack stack = w.getStack();
                    if (stack != null) {
                        stack.getBounds(frame);
                    }
                } else if (!mutableIncludeFullDisplay.value && !w.mIsWallpaper) {
                    final Rect wf = w.mFrame;
                    final Rect cr = w.mContentInsets;