feat(workspace): when the sleep window is opened, the active window event is not triggered

This commit is contained in:
liujuping 2023-08-02 10:51:55 +08:00 committed by JackLian
parent c2e97bd3de
commit 2dcdcfb913

View File

@ -266,10 +266,12 @@ export class Workspace implements IWorkspace {
});
this.windows = [...this.windows, window];
this.editorWindowMap.set(window.id, window);
if (!sleep) {
this.window = window;
await this.window.init();
if (sleep) {
this.emitChangeWindow();
return;
}
this.window = window;
await this.window.init();
this.emitChangeWindow();
this.emitChangeActiveWindow();
this.window?.updateState(WINDOW_STATE.active);