onConsoleChange(type) { let currentWindow = remote.getCurrentWindow(); if(!currentWindow.isFocused()) { ipcRenderer.send('application:dock-message-notification', currentWindow.id); } if(this.state.showConsole) { return; } ReplStore.showBell(); }
function isFocused() { return remote.getCurrentWindow().isFocused(); }
mainWindow.webContents.on('did-finish-load', () => { if (insideAuthFlow && mainWindow.webContents && mainWindow.webContents.getURL().startsWith(WEBAPP_ENDPOINT)) { insideAuthFlow = false; } webContentsSend(mainWindow != null && mainWindow.isFocused() ? 'MAIN_WINDOW_FOCUS' : 'MAIN_WINDOW_BLUR'); if (!lastPageLoadFailed) { connectionBackoff.succeed(); } events.emit("ready") });
mainWindow.webContents.on('did-finish-load', () => { if (insideAuthFlow && mainWindow.webContents && mainWindow.webContents.getURL().startsWith(WEBAPP_ENDPOINT)) { insideAuthFlow = false; } webContentsSend(mainWindow != null && mainWindow.isFocused() ? 'MAIN_WINDOW_FOCUS' : 'MAIN_WINDOW_BLUR'); if (!lastPageLoadFailed) { connectionBackoff.succeed(); } events.emit("ready") });