@netless/window-manager 0.4.0-canary.22 → 0.4.0-canary.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AppProxy.d.ts +1 -1
- package/dist/index.es.js +2 -2
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/AppManager.ts +5 -0
- package/src/AppProxy.ts +2 -1
package/package.json
CHANGED
package/src/AppManager.ts
CHANGED
@@ -22,6 +22,7 @@ import type { ReconnectRefresher } from "./ReconnectRefresher";
|
|
22
22
|
import type { BoxManager } from "./BoxManager";
|
23
23
|
import type { Displayer, DisplayerState, Room } from "white-web-sdk";
|
24
24
|
import type { AddAppParams, BaseInsertParams, TeleBoxRect, EmitterEvent } from "./index";
|
25
|
+
import { appRegister } from "./Register";
|
25
26
|
|
26
27
|
export class AppManager {
|
27
28
|
public displayer: Displayer;
|
@@ -469,6 +470,10 @@ export class AppManager {
|
|
469
470
|
}
|
470
471
|
case "focus": {
|
471
472
|
this.windowManger.safeSetAttributes({ focus: payload.appId });
|
473
|
+
const appProxy = this.appProxies.get(payload.appId);
|
474
|
+
if (appProxy) {
|
475
|
+
appRegister.notifyApp(appProxy.kind, "focus", { appId: payload.appId });
|
476
|
+
}
|
472
477
|
break;
|
473
478
|
}
|
474
479
|
case "resize": {
|
package/src/AppProxy.ts
CHANGED
@@ -22,6 +22,7 @@ import type { NetlessApp } from "./typings";
|
|
22
22
|
import type { ReadonlyTeleBox } from "@netless/telebox-insider";
|
23
23
|
|
24
24
|
export class AppProxy {
|
25
|
+
public kind: string;
|
25
26
|
public id: string;
|
26
27
|
public scenePath?: string;
|
27
28
|
public appEmitter: Emittery<AppEmitterEvent>;
|
@@ -32,7 +33,7 @@ export class AppProxy {
|
|
32
33
|
private appProxies = this.manager.appProxies;
|
33
34
|
private viewManager = this.manager.viewManager;
|
34
35
|
private store = this.manager.store;
|
35
|
-
|
36
|
+
|
36
37
|
public isAddApp: boolean;
|
37
38
|
private status: "normal" | "destroyed" = "normal";
|
38
39
|
private stateKey: string;
|