This repository was archived by the owner on Jul 22, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
app/src/common/shared/org/mozilla/vrbrowser/ui/widgets Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -238,13 +238,11 @@ public void closeWindow(@NonNull WindowWidget aWindow) {
238238 if (leftWindow == aWindow ) {
239239 removeWindow (leftWindow );
240240 if (mFocusedWindow == leftWindow ) {
241- mFocusedWindow = null ;
242241 focusWindow (frontWindow );
243242 }
244243 } else if (rightWindow == aWindow ) {
245244 removeWindow (rightWindow );
246245 if (mFocusedWindow == rightWindow ) {
247- mFocusedWindow = null ;
248246 focusWindow (frontWindow );
249247 }
250248 } else if (frontWindow == aWindow ) {
@@ -256,7 +254,6 @@ public void closeWindow(@NonNull WindowWidget aWindow) {
256254 }
257255
258256 if (mFocusedWindow == frontWindow && !getCurrentWindows ().isEmpty ()) {
259- mFocusedWindow = null ;
260257 focusWindow (getFrontWindow ());
261258 }
262259
@@ -319,7 +316,7 @@ public void focusWindow(@NonNull WindowWidget aWindow) {
319316 if (aWindow != mFocusedWindow ) {
320317 WindowWidget prev = mFocusedWindow ;
321318 mFocusedWindow = aWindow ;
322- if (prev != null ) {
319+ if (prev != null && getCurrentWindows (). contains ( prev ) ) {
323320 prev .setActiveWindow (false );
324321 if (prev .isVisible ()) {
325322 prev .getTitleBar ().setVisible (true );
You can’t perform that action at this time.
0 commit comments