Skip to content

Commit cf3d7a8

Browse files
liujupingJackLian
authored andcommitted
feat(workspace): when the sleep window is opened, the active window event is not triggered
1 parent 15f5675 commit cf3d7a8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/workspace/src/workspace.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,10 +266,12 @@ export class Workspace implements IWorkspace {
266266
});
267267
this.windows = [...this.windows, window];
268268
this.editorWindowMap.set(window.id, window);
269-
if (!sleep) {
270-
this.window = window;
271-
await this.window.init();
269+
if (sleep) {
270+
this.emitChangeWindow();
271+
return;
272272
}
273+
this.window = window;
274+
await this.window.init();
273275
this.emitChangeWindow();
274276
this.emitChangeActiveWindow();
275277
this.window?.updateState(WINDOW_STATE.active);

0 commit comments

Comments
 (0)