Properly remove hotwindow reference when window is destroyed

This commit is contained in:
Ben Gotow 2018-11-09 12:09:23 -08:00
parent 412d690945
commit b8f9bc8d44

View file

@ -122,6 +122,9 @@ export default class WindowManager {
_didCreateNewWindow = win => {
win.browserWindow.on('closed', () => {
delete this._windows[win.windowKey];
if (this.windowLauncher.hotWindow === win) {
this.windowLauncher.hotWindow = null;
}
this.quitWinLinuxIfNoWindows();
});