Notification: Focus/unminimize/activate window on click
Before, we would only focus, but not unminimize or show, etc.
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
@@ -982,7 +982,7 @@ function showDoneNotification (torrent) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
notif.onclick = function () {
|
notif.onclick = function () {
|
||||||
window.focus()
|
ipcRenderer.send('focusWindow', 'main')
|
||||||
}
|
}
|
||||||
|
|
||||||
playInterfaceSound('DONE')
|
playInterfaceSound('DONE')
|
||||||
|
|||||||
Reference in New Issue
Block a user