提交 7dfe3430 编写于 作者: B Benjamin Pasero

toggle fullscreen class for #12377

上级 fafb6c1d
......@@ -323,6 +323,15 @@ export class VSCodeWindow {
this._lastFocusTime = Date.now();
});
// Window Fullscreen
this._win.on('enter-full-screen', () => {
this.sendWhenReady('vscode:enterFullScreen');
});
this._win.on('leave-full-screen', () => {
this.sendWhenReady('vscode:leaveFullScreen');
});
// Window Failed to load
this._win.webContents.on('did-fail-load', (event: Event, errorCode: string, errorDescription: string) => {
console.warn('[electron event]: fail to load, ', errorDescription);
......
......@@ -129,6 +129,19 @@ export class ElectronIntegration {
this.toggleAutoSave();
});
// Fullscreen Events
ipc.on('vscode:enterFullScreen', (event) => {
this.partService.joinCreation().then(() => {
this.partService.addClass('fullscreen');
});
});
ipc.on('vscode:leaveFullScreen', (event) => {
this.partService.joinCreation().then(() => {
this.partService.removeClass('fullscreen');
});
});
// Ensure others can listen to zoom level changes
browser.setZoomLevel(webFrame.getZoomLevel());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册