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

Commit

Permalink
Fix reattach navbar and tray regression when a window is closed (#1669)
Browse files Browse the repository at this point in the history
  • Loading branch information
MortimerGoro authored and keianhzo committed Aug 27, 2019
1 parent d9a5082 commit 5801937
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,13 +238,11 @@ public void closeWindow(@NonNull WindowWidget aWindow) {
if (leftWindow == aWindow) {
removeWindow(leftWindow);
if (mFocusedWindow == leftWindow) {
mFocusedWindow = null;
focusWindow(frontWindow);
}
} else if (rightWindow == aWindow) {
removeWindow(rightWindow);
if (mFocusedWindow == rightWindow) {
mFocusedWindow = null;
focusWindow(frontWindow);
}
} else if (frontWindow == aWindow) {
Expand All @@ -256,7 +254,6 @@ public void closeWindow(@NonNull WindowWidget aWindow) {
}

if (mFocusedWindow == frontWindow && !getCurrentWindows().isEmpty()) {
mFocusedWindow = null;
focusWindow(getFrontWindow());
}

Expand Down Expand Up @@ -319,7 +316,7 @@ public void focusWindow(@NonNull WindowWidget aWindow) {
if (aWindow != mFocusedWindow) {
WindowWidget prev = mFocusedWindow;
mFocusedWindow = aWindow;
if (prev != null) {
if (prev != null && getCurrentWindows().contains(prev)) {
prev.setActiveWindow(false);
if (prev.isVisible()) {
prev.getTitleBar().setVisible(true);
Expand Down

0 comments on commit 5801937

Please sign in to comment.