Add ability to unhide the window from the renderer

via ipc, for instance if a notification is clicked but the window is
closed/hidden.

// FREEBIE
This commit is contained in:
lilia 2017-04-27 18:03:22 -07:00 committed by Scott Nonnenberg
parent f716f70bf4
commit b5649a6874
No known key found for this signature in database
GPG Key ID: A4931C09644C654B
2 changed files with 9 additions and 1 deletions

View File

@ -141,7 +141,11 @@ function createWindow () {
// in an array if your app supports multi windows, this is the time
// when you should delete the corresponding element.
mainWindow = null
})
});
ipc.on('show-window', function() {
mainWindow.show();
});
}
// This method will be called when Electron has finished

View File

@ -15,6 +15,10 @@
console.log('draw attention');
ipc.send('draw-attention');
};
window.showWindow = function() {
console.log('show window');
ipc.send('show-window');
};
/**
* Enables spell-checking and the right-click context menu in text editors.
* Electron (`webFrame.setSpellCheckProvider`) only underlines misspelled words;