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

Fix exit fullscreen viewport scaling issues #845

Merged
merged 1 commit into from
Nov 27, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this solves the issue for now. shall we keep #833 open for a more proper investigation + solution after 1.1?


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