frameworks/base
Revision | 1efec9431d3d95480004966d00c694af0806b3b0 (tree) |
---|---|
Time | 2020-06-11 18:56:23 |
Author | utzcoz <utzcoz@outl...> |
Commiter | utzcoz |
Trigger resize when window from freeform to fullscreen
It will fix blankscreen when changing freeform window to fullscreen.
Signed-off-by: utzcoz <utzcoz@outlook.com>
@@ -620,6 +620,15 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai | ||
620 | 620 | } |
621 | 621 | } |
622 | 622 | |
623 | + // region @boringdroid | |
624 | + // Current logic, if we change windowing mode from freeform to fullscreen, getOverrideBounds() will | |
625 | + // return empty, the same as mTmpRect2, which doesn't trigger resize for window. So if current mode | |
626 | + // is freeform, and new mode is fullscreen, we should resize window forcibly to avoid rigid | |
627 | + // rendering problem. | |
628 | + if (mTmpRect2.isEmpty() && currentMode == WINDOWING_MODE_FREEFORM) { | |
629 | + resize(mTmpRect2, null /* tempTaskBounds */, null /* tempTaskInsetBounds */); | |
630 | + } | |
631 | + // endregion | |
623 | 632 | if (!Objects.equals(getOverrideBounds(), mTmpRect2)) { |
624 | 633 | resize(mTmpRect2, null /* tempTaskBounds */, null /* tempTaskInsetBounds */); |
625 | 634 | } |