From 3177b95ecdaeb128d52ef5f2f16284f456140b74 Mon Sep 17 00:00:00 2001 From: Manuel Martin Date: Tue, 14 Jan 2020 20:12:00 +0100 Subject: [PATCH] Correctly focus front window after another is closed (#2640) --- .../shared/org/mozilla/vrbrowser/ui/widgets/Windows.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 f070c30fb..5a9667e8b 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 @@ -307,9 +307,8 @@ public void closeWindow(@NonNull WindowWidget aWindow) { placeWindow(leftWindow, WindowPlacement.FRONT); } - frontWindow = getFrontWindow(); - if (mFocusedWindow == frontWindow && !getCurrentWindows().isEmpty() && frontWindow != null) { - focusWindow(frontWindow); + if (mFocusedWindow == frontWindow && !getCurrentWindows().isEmpty() && getFrontWindow() != null) { + focusWindow(getFrontWindow()); } }