diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/Windows.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/Windows.java index 927497828..bc2c9789b 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/Windows.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/Windows.java @@ -487,12 +487,12 @@ public void exitPrivateMode() { } else { mPrivateWindowPlacement = WindowPlacement.FRONT; } - for (WindowWidget window: mRegularWindows) { - setWindowVisible(window, true); - } for (WindowWidget window: mPrivateWindows) { setWindowVisible(window, false); } + for (WindowWidget window: mRegularWindows) { + setWindowVisible(window, true); + } focusWindow(getWindowWithPlacement(mRegularWindowPlacement)); updateViews(); mWidgetManager.popWorldBrightness(this); diff --git a/app/src/oculusvr/cpp/DeviceDelegateOculusVR.cpp b/app/src/oculusvr/cpp/DeviceDelegateOculusVR.cpp index a6648b08d..18705d9f9 100644 --- a/app/src/oculusvr/cpp/DeviceDelegateOculusVR.cpp +++ b/app/src/oculusvr/cpp/DeviceDelegateOculusVR.cpp @@ -1454,7 +1454,7 @@ DeviceDelegateOculusVR::EndFrame(const bool aDiscard) { // Draw back layers for (const OculusLayerPtr& layer: m.uiLayers) { - if (!layer->GetDrawInFront() && layer->IsDrawRequested() && layerCount < ovrMaxLayerCount) { + if (!layer->GetDrawInFront() && layer->IsDrawRequested() && (layerCount < ovrMaxLayerCount - 1)) { layer->Update(m.predictedTracking); layers[layerCount++] = layer->Header(); layer->ClearRequestDraw();