Update to Electron 0.37.6 (#5378)

* electron bump

* oss bump

* adopt missing will-quit call when using process.exit()

* more bgcolor fixes

* add comment
This commit is contained in:
Benjamin Pasero 2016-04-16 18:54:01 +02:00
parent bc644c03aa
commit 339b989984
5 changed files with 21 additions and 15 deletions

View file

@ -57,7 +57,7 @@
}, },
{ {
"name": "electron", "name": "electron",
"version": "0.37.5", "version": "0.37.6",
"license": "MIT", "license": "MIT",
"repositoryURL": "https://github.com/atom/electron", "repositoryURL": "https://github.com/atom/electron",
"isProd": true "isProd": true

View file

@ -1,7 +1,7 @@
{ {
"name": "Code", "name": "Code",
"version": "1.0.0", "version": "1.0.0",
"electronVersion": "0.37.5", "electronVersion": "0.37.6",
"author": { "author": {
"name": "Microsoft Corporation" "name": "Microsoft Corporation"
}, },

View file

@ -5,7 +5,7 @@
'use strict'; 'use strict';
import {app} from 'electron'; import {app, ipcMain as ipc} from 'electron';
import fs = require('fs'); import fs = require('fs');
import nls = require('vs/nls'); import nls = require('vs/nls');
import {assign} from 'vs/base/common/objects'; import {assign} from 'vs/base/common/objects';
@ -101,7 +101,7 @@ function quit(arg?: any) {
} }
} }
process.exit(exitCode); process.exit(exitCode); // in main, process.exit === app.exit
} }
function main(ipcServer: Server, userEnv: env.IProcessEnvironment): void { function main(ipcServer: Server, userEnv: env.IProcessEnvironment): void {
@ -140,10 +140,7 @@ function main(ipcServer: Server, userEnv: env.IProcessEnvironment): void {
// Set programStart in the global scope // Set programStart in the global scope
global.programStart = env.cliArgs.programStart; global.programStart = env.cliArgs.programStart;
// Dispose on app quit function dispose() {
app.on('will-quit', () => {
env.log('App#dispose: deleting running instance handle');
if (ipcServer) { if (ipcServer) {
ipcServer.dispose(); ipcServer.dispose();
ipcServer = null; ipcServer = null;
@ -154,6 +151,21 @@ function main(ipcServer: Server, userEnv: env.IProcessEnvironment): void {
if (windowsMutex) { if (windowsMutex) {
windowsMutex.release(); windowsMutex.release();
} }
}
// Dispose on app quit
app.on('will-quit', () => {
env.log('App#will-quit: disposing resources');
dispose();
});
// Dispose on vscode:exit
ipc.on('vscode:exit', (event, code: number) => {
env.log('IPC#vscode:exit', code);
dispose();
process.exit(code); // in main, process.exit === app.exit
}); });
// Lifecycle // Lifecycle

View file

@ -175,7 +175,7 @@ export class VSCodeWindow {
height: this.windowState.height, height: this.windowState.height,
x: this.windowState.x, x: this.windowState.x,
y: this.windowState.y, y: this.windowState.y,
backgroundColor: usesLightTheme ? '#FFFFFF' : platform.isMacintosh ? '#171717' : '#1E1E1E', // https://github.com/electron/electron/issues/5150 backgroundColor: usesLightTheme ? '#FFFFFF' : platform.isMacintosh ? '#131313' : '#1E1E1E', // https://github.com/electron/electron/issues/5150
minWidth: VSCodeWindow.MIN_WIDTH, minWidth: VSCodeWindow.MIN_WIDTH,
minHeight: VSCodeWindow.MIN_HEIGHT, minHeight: VSCodeWindow.MIN_HEIGHT,
show: showDirectly && this.currentWindowMode !== WindowMode.Maximized, // in case we are maximized, only show later after the call to maximize (see below) show: showDirectly && this.currentWindowMode !== WindowMode.Maximized, // in case we are maximized, only show later after the call to maximize (see below)

View file

@ -359,12 +359,6 @@ export class WindowsManager {
console[logEntry.severity].apply(console, args); console[logEntry.severity].apply(console, args);
}); });
ipc.on('vscode:exit', (event, code: number) => {
env.log('IPC#vscode:exit', code);
process.exit(code);
});
ipc.on('vscode:closeExtensionHostWindow', (event, extensionDevelopmentPath: string) => { ipc.on('vscode:closeExtensionHostWindow', (event, extensionDevelopmentPath: string) => {
env.log('IPC#vscode:closeExtensionHostWindow', extensionDevelopmentPath); env.log('IPC#vscode:closeExtensionHostWindow', extensionDevelopmentPath);