Add responsive and unresponsive events for window.
This commit is contained in:
parent
556e84f53a
commit
ae88f303fa
7 changed files with 32 additions and 0 deletions
|
@ -7,9 +7,11 @@
|
|||
This is the default mode of Atom Shell, please follow the instructions in
|
||||
wiki to get started.
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
|
||||
var ipc = require('ipc');
|
||||
|
||||
window.addEventListener('contextmenu', function (e) {
|
||||
while(1) {}
|
||||
e.preventDefault();
|
||||
ipc.send('menu');
|
||||
}, false);
|
||||
|
|
|
@ -30,6 +30,10 @@ delegate.browserMainParts.preMainMessageLoopRun = function() {
|
|||
mainWindow = null;
|
||||
});
|
||||
|
||||
mainWindow.on('unresponsive', function() {
|
||||
console.log('unresponsive');
|
||||
});
|
||||
|
||||
var template = [
|
||||
{
|
||||
label: 'Atom Shell',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue