diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/WindowWidget.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/WindowWidget.java index 57b84195e..bdee1a06e 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/WindowWidget.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/WindowWidget.java @@ -314,6 +314,11 @@ public void onResume() { super.onResume(); if (isVisible() || mIsInVRVideoMode) { mSession.setActive(true); + if (!SettingsStore.getInstance(getContext()).getLayersEnabled()) { + // Ensure the Gecko Display is correctly recreated. + // See: https://github.com/MozillaReality/FirefoxReality/issues/2880 + callSurfaceChanged(); + } } } @@ -732,7 +737,7 @@ public void setSurface(Surface aSurface, final int aWidth, final int aHeight, Ru } private void callSurfaceChanged() { - if (mSession != null) { + if (mSession != null && mSurface != null) { mSession.surfaceChanged(mSurface, mBorderWidth, mBorderWidth, mWidth - mBorderWidth * 2, mHeight - mBorderWidth * 2); mSession.updateLastUse(); }