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

Commit d0294c3

Browse files
MortimerGorobluemarvin
authored andcommitted
Do not let a received tab take ownership of the window when the window is full-screened or playing a immersive video (#2269)
1 parent 3a9f84d commit d0294c3

File tree

1 file changed

+5
-2
lines changed
  • app/src/common/shared/org/mozilla/vrbrowser/ui/widgets

1 file changed

+5
-2
lines changed

app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/Windows.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,6 +1245,7 @@ public void onTabsClose(ArrayList<Session> aTabs) {
12451245
@Override
12461246
public void onTabsReceived(@NotNull List<TabData> aTabs) {
12471247
WindowWidget targetWindow = mFocusedWindow;
1248+
boolean fullscreen = targetWindow.getSession().isInFullScreen();
12481249
for (int i = aTabs.size() - 1; i >= 0; --i) {
12491250
Session session = SessionStore.get().createSession(targetWindow.getSession().isPrivateMode());
12501251
// Cache the provided data to avoid delays if the tabs are loaded at the same time the
@@ -1253,14 +1254,16 @@ public void onTabsReceived(@NotNull List<TabData> aTabs) {
12531254
session.getSessionState().mUri = aTabs.get(i).getUrl();
12541255
session.loadUri(aTabs.get(i).getUrl());
12551256
session.updateLastUse();
1256-
if (i == 0) {
1257+
if (i == 0 && !fullscreen) {
12571258
// Set the first received tab of the list the current one.
12581259
SessionStore.get().setActiveSession(session);
12591260
targetWindow.setSession(session);
12601261
}
12611262
}
12621263

1263-
mWidgetManager.getTray().showTabAddedNotification();
1264+
if (!fullscreen) {
1265+
mWidgetManager.getTray().showTabAddedNotification();
1266+
}
12641267

12651268
if (mTabsWidget != null && mTabsWidget.isVisible()) {
12661269
mTabsWidget.refreshTabs();

0 commit comments

Comments
 (0)