mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
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:
parent
bc644c03aa
commit
339b989984
|
@ -57,7 +57,7 @@
|
|||
},
|
||||
{
|
||||
"name": "electron",
|
||||
"version": "0.37.5",
|
||||
"version": "0.37.6",
|
||||
"license": "MIT",
|
||||
"repositoryURL": "https://github.com/atom/electron",
|
||||
"isProd": true
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "Code",
|
||||
"version": "1.0.0",
|
||||
"electronVersion": "0.37.5",
|
||||
"electronVersion": "0.37.6",
|
||||
"author": {
|
||||
"name": "Microsoft Corporation"
|
||||
},
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
import {app} from 'electron';
|
||||
import {app, ipcMain as ipc} from 'electron';
|
||||
import fs = require('fs');
|
||||
import nls = require('vs/nls');
|
||||
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 {
|
||||
|
@ -140,10 +140,7 @@ function main(ipcServer: Server, userEnv: env.IProcessEnvironment): void {
|
|||
// Set programStart in the global scope
|
||||
global.programStart = env.cliArgs.programStart;
|
||||
|
||||
// Dispose on app quit
|
||||
app.on('will-quit', () => {
|
||||
env.log('App#dispose: deleting running instance handle');
|
||||
|
||||
function dispose() {
|
||||
if (ipcServer) {
|
||||
ipcServer.dispose();
|
||||
ipcServer = null;
|
||||
|
@ -154,6 +151,21 @@ function main(ipcServer: Server, userEnv: env.IProcessEnvironment): void {
|
|||
if (windowsMutex) {
|
||||
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
|
||||
|
|
|
@ -175,7 +175,7 @@ export class VSCodeWindow {
|
|||
height: this.windowState.height,
|
||||
x: this.windowState.x,
|
||||
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,
|
||||
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)
|
||||
|
|
|
@ -359,12 +359,6 @@ export class WindowsManager {
|
|||
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) => {
|
||||
env.log('IPC#vscode:closeExtensionHostWindow', extensionDevelopmentPath);
|
||||
|
||||
|
|
Loading…
Reference in a new issue