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
This commit is contained in:
@@ -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.
|
||||
w = Math.min(w, pw);
|
||||
h = Math.min(h, ph);
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user