Add 'quit' and 'window-all-closed' events for app module.

This commit is contained in:
Cheng Zhao 2013-05-03 10:53:54 +08:00
parent 66404b5f15
commit 9b75019898
10 changed files with 123 additions and 15 deletions

View file

@ -1,9 +1,15 @@
var app = require('app');
var atom = require('atom');
var ipc = require('ipc');
var Window = require('window');
var mainWindow = null;
// Quit when all windows are closed.
app.on('window-all-closed', function() {
app.terminate();
});
// Echo every message back.
ipc.on('message', function(process_id, routing_id) {
ipc.send.apply(ipc, arguments);