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

Commit 9f84d3f

Browse files
MortimerGorobluemarvin
authored andcommitted
Update tray when a window is closed (and focus didn't change) (#1723)
1 parent 376611a commit 9f84d3f

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,11 @@ public void onWindowBorderChanged(@NonNull WindowWidget aChangeWindow) {
270270
public void onWindowsMoved() {
271271
updateWidget(mTray);
272272
}
273+
274+
@Override
275+
public void onWindowClosed() {
276+
updateWidget(mTray);
277+
}
273278
});
274279

275280
// Create Browser navigation widget

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ public interface Delegate {
8989
void onFocusedWindowChanged(@NonNull WindowWidget aFocusedWindow, @Nullable WindowWidget aPrevFocusedWindow);
9090
void onWindowBorderChanged(@NonNull WindowWidget aChangeWindow);
9191
void onWindowsMoved();
92+
void onWindowClosed();
9293
}
9394

9495
public Windows(Context aContext) {
@@ -276,6 +277,9 @@ public void closeWindow(@NonNull WindowWidget aWindow) {
276277
}
277278

278279
updateViews();
280+
if (mDelegate != null) {
281+
mDelegate.onWindowClosed();
282+
}
279283
}
280284

281285
public void moveWindowRight(@NonNull WindowWidget aWindow) {

0 commit comments

Comments
 (0)