Fixed browser window not opening.

This commit is contained in:
Sean Li 2015-02-03 14:20:01 -08:00
parent c78549a45f
commit 3b9244159e
1 changed files with 18 additions and 11 deletions

View File

@ -19,17 +19,16 @@ if (argv.integration) {
process.env.TEST_TYPE = 'test';
}
var mainWindow = new BrowserWindow({
width: 1000,
height: 700,
'min-width': 1000,
'min-height': 700,
resizable: true,
frame: false,
show: false
});
app.on('activate-with-no-open-windows', function () {
var mainWindow = new BrowserWindow({
width: 1000,
height: 700,
'min-width': 1000,
'min-height': 700,
resizable: true,
frame: false,
show: false
});
if (mainWindow) {
mainWindow.show();
}
@ -37,7 +36,15 @@ app.on('activate-with-no-open-windows', function () {
});
app.on('ready', function() {
var mainWindow = new BrowserWindow({
width: 1000,
height: 700,
'min-width': 1000,
'min-height': 700,
resizable: true,
frame: false,
show: false
});
if (argv.test) {
mainWindow.loadUrl('file://' + __dirname + '/../tests/tests.html');
} else {