提交 218c005f 编写于 作者: B Benjamin Pasero

missing merge changes

上级 2e1545d5
......@@ -187,7 +187,7 @@ export class LifecycleService implements ILifecycleService {
c(true); // veto
});
vscodeWindow.send('vscode:beforeUnload', { okChannelReply: oneTimeOkEvent, cancelChannelReply: oneTimeCancelEvent, quitRequested: this.quitRequested });
vscodeWindow.send('vscode:beforeUnload', { okChannel: oneTimeOkEvent, cancelChannel: oneTimeCancelEvent, quitRequested: this.quitRequested });
});
}
......
......@@ -50,19 +50,19 @@ export class LifecycleService implements ILifecycleService {
const windowId = this.windowService.getWindowId();
// Main side indicates that window is about to unload, check for vetos
ipc.on('vscode:beforeUnload', (event, args: { okChannelReply: string, cancelChannelReply: string, quitRequested: boolean }) => {
ipc.on('vscode:beforeUnload', (event, reply: { okChannel: string, cancelChannel: string, quitRequested: boolean }) => {
this._willShutdown = true;
this._quitRequested = args.quitRequested;
this._quitRequested = reply.quitRequested;
// trigger onWillShutdown events and veto collecting
this.onBeforeUnload(args.quitRequested).done(veto => {
this.onBeforeUnload(reply.quitRequested).done(veto => {
this._quitRequested = false;
if (veto) {
this._willShutdown = false; // reset this flag since the shutdown has been vetoed!
ipc.send(args.cancelChannelReply, windowId);
ipc.send(reply.cancelChannel, windowId);
} else {
this._onShutdown.fire();
ipc.send(args.okChannelReply, windowId);
ipc.send(reply.okChannel, windowId);
}
});
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册