Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Fix exit fullscreen viewport scaling issues. Fixes #833 (#845)
Browse files Browse the repository at this point in the history
  • Loading branch information
MortimerGoro authored Nov 27, 2018
1 parent b92a5e6 commit f5e522d
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,14 @@ private void exitFullScreenMode() {
return;
}

// We need to add a delay for the exitFullScreen() call to solve some viewport scaling issues,
// See https://github.com/MozillaReality/FirefoxReality/issues/833 for more info.
getHandler().postDelayed(() -> {
if (SessionStore.get().isInFullScreen()) {
SessionStore.get().exitFullScreen();
}
}, 50);

mBrowserWidget.getPlacement().copyFrom(mSizeBeforeFullScreen);
mWidgetManager.updateWidget(mBrowserWidget);

Expand All @@ -427,10 +435,6 @@ private void exitFullScreenMode() {
mWidgetManager.popWorldBrightness(this);
AnimationHelper.fadeOut(mFullScreenModeContainer, 0, null);

if (SessionStore.get().isInFullScreen()) {
SessionStore.get().exitFullScreen();
}

mWidgetManager.setTrayVisible(true);
closeFloatingMenus();
mWidgetManager.popWorldBrightness(mBrightnessWidget);
Expand Down

0 comments on commit f5e522d

Please sign in to comment.