diff --git a/main/ipc.js b/main/ipc.js index 8c76c987..99682719 100644 --- a/main/ipc.js +++ b/main/ipc.js @@ -70,6 +70,10 @@ function init () { shortcuts.unregisterPlayerShortcuts() }) + ipcMain.on('focusWindow', function (e, windowName) { + windows.focusWindow(windows[windowName]) + }) + // Capture all events var oldEmit = ipcMain.emit ipcMain.emit = function (name, e, ...args) { diff --git a/renderer/index.js b/renderer/index.js index cd588594..f4c88199 100644 --- a/renderer/index.js +++ b/renderer/index.js @@ -982,7 +982,7 @@ function showDoneNotification (torrent) { }) notif.onclick = function () { - window.focus() + ipcRenderer.send('focusWindow', 'main') } playInterfaceSound('DONE')