Notification: Focus/unminimize/activate window on click

Before, we would only focus, but not unminimize or show, etc.
This commit is contained in:
Feross Aboukhadijeh
2016-04-05 18:33:48 -07:00
parent 11f78b2881
commit cf3b319fc7
2 changed files with 5 additions and 1 deletions

View File

@@ -70,6 +70,10 @@ function init () {
shortcuts.unregisterPlayerShortcuts() shortcuts.unregisterPlayerShortcuts()
}) })
ipcMain.on('focusWindow', function (e, windowName) {
windows.focusWindow(windows[windowName])
})
// Capture all events // Capture all events
var oldEmit = ipcMain.emit var oldEmit = ipcMain.emit
ipcMain.emit = function (name, e, ...args) { ipcMain.emit = function (name, e, ...args) {

View File

@@ -982,7 +982,7 @@ function showDoneNotification (torrent) {
}) })
notif.onclick = function () { notif.onclick = function () {
window.focus() ipcRenderer.send('focusWindow', 'main')
} }
playInterfaceSound('DONE') playInterfaceSound('DONE')