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

Commit b171abbc authored by Wale Ogunwale's avatar Wale Ogunwale
Browse files

Don't limit fullscreen stack window size to parent window size

A previous change limited the size of a window to the parent window
size at max. so that child windows don't extend outside their parent
stack when resized in a multi-window environment. This broke the
wallpaper positioning functionality since the wallpaper is no longer
bigger than it's containing stack so it can't be scrolled. Now, we
only limit the window size to the parent window size if the window
stack is not fullscreen.

Bug: 19434096
Bug: 19225079
Change-Id: I1a8788727e6c4a91da45d8a87850093ef5a24edf
parent 6bac04ab
Loading
Loading
Loading
Loading
+10 −5
Original line number Diff line number Diff line
@@ -523,8 +523,9 @@ final class WindowState implements WindowManagerPolicy.WindowState {
    public void computeFrameLw(Rect pf, Rect df, Rect of, Rect cf, Rect vf, Rect dcf, Rect sf) {
        mHaveFrame = true;

        TaskStack stack = mAppToken != null ? getStack() : null;
        if (stack != null && !stack.isFullscreen()) {
        final TaskStack stack = mAppToken != null ? getStack() : null;
        final boolean nonFullscreenStack = stack != null && !stack.isFullscreen();
        if (nonFullscreenStack) {
            stack.getBounds(mContainingFrame);
            final WindowState imeWin = mService.mInputMethodWindow;
            if (imeWin != null && imeWin.isVisibleNow() && mService.mInputMethodTarget == this
@@ -607,9 +608,13 @@ final class WindowState implements WindowManagerPolicy.WindowState {
            y = mAttrs.y;
        }

        // Make sure window fits in containing frame required by {@link Gravity#apply} call.
        if (nonFullscreenStack) {
            // Make sure window fits in containing frame since it is in a non-fullscreen stack as
            // required by {@link Gravity#apply} call.
            w = Math.min(w, pw);
            h = Math.min(h, ph);
        }

        Gravity.apply(mAttrs.gravity, w, h, mContainingFrame,
                (int) (x + mAttrs.horizontalMargin * pw),
                (int) (y + mAttrs.verticalMargin * ph), mFrame);