Add responsive and unresponsive events for window.

This commit is contained in:
Cheng Zhao 2013-06-06 19:45:48 +08:00
parent 556e84f53a
commit ae88f303fa
7 changed files with 32 additions and 0 deletions

View file

@ -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);

View file

@ -30,6 +30,10 @@ delegate.browserMainParts.preMainMessageLoopRun = function() {
mainWindow = null;
});
mainWindow.on('unresponsive', function() {
console.log('unresponsive');
});
var template = [
{
label: 'Atom Shell',