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

Commit cd7e648

Browse files
authored
Fix thread of Windows exit/enter immersive calls. Avoid superfluos call. (#3142)
* Avoid superfluous call to ResumeCompositor * Dispatch Windows (and internal Gecko) calls in the correct thread
1 parent 2d38f82 commit cd7e648

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

app/src/common/shared/org/mozilla/vrbrowser/VRBrowserActivity.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -961,7 +961,8 @@ void pauseGeckoViewCompositor() {
961961
return;
962962
}
963963
mIsPresentingImmersive = true;
964-
mWindows.enterImmersiveMode();
964+
runOnUiThread(() -> mWindows.enterImmersiveMode());
965+
965966
TelemetryWrapper.startImmersive();
966967
GleanMetricsService.startImmersive();
967968
PauseCompositorRunnable runnable = new PauseCompositorRunnable();
@@ -985,7 +986,8 @@ void resumeGeckoViewCompositor() {
985986
return;
986987
}
987988
mIsPresentingImmersive = false;
988-
mWindows.exitImmersiveMode();
989+
runOnUiThread(() -> mWindows.exitImmersiveMode());
990+
989991
// Show the window in front of you when you exit immersive mode.
990992
resetUIYaw();
991993

app/src/main/cpp/ExternalVR.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ struct ExternalVR::State {
127127
vrb::Vector eyeOffsets[device::EyeCount];
128128
uint64_t lastFrameId = 0;
129129
bool firstPresentingFrame = false;
130-
bool compositorEnabled = false;
130+
bool compositorEnabled = true;
131131
bool waitingForExit = false;
132132

133133
State() {

0 commit comments

Comments
 (0)