@netless/window-manager 0.4.0-canary.24 → 0.4.0-canary.25

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netless/window-manager",
3
- "version": "0.4.0-canary.24",
3
+ "version": "0.4.0-canary.25",
4
4
  "description": "",
5
5
  "main": "dist/index.es.js",
6
6
  "module": "dist/index.es.js",
package/src/AppManager.ts CHANGED
@@ -20,7 +20,7 @@ import { store } from "./AttributesDelegate";
20
20
  import { ViewManager } from "./View/ViewManager";
21
21
  import type { ReconnectRefresher } from "./ReconnectRefresher";
22
22
  import type { BoxManager } from "./BoxManager";
23
- import type { Displayer, DisplayerState, Room , ScenesCallbacksNode } from "white-web-sdk";
23
+ import type { Displayer, DisplayerState, Room, ScenesCallbacksNode } from "white-web-sdk";
24
24
  import type { AddAppParams, BaseInsertParams, TeleBoxRect, EmitterEvent } from "./index";
25
25
  import { appRegister } from "./Register";
26
26
 
@@ -83,11 +83,11 @@ export class AppManager {
83
83
  }
84
84
  });
85
85
  this.callbacksNode = this.displayer.createScenesCallback(ROOT_DIR, {
86
- onAddScene: (scenesCallback) => {
86
+ onAddScene: scenesCallback => {
87
87
  this.mainViewScenesLength = scenesCallback.scenes.length;
88
88
  callbacks.emit("mainViewScenesLengthChange", this.mainViewScenesLength);
89
89
  },
90
- onRemoveScene: (scenesCallback) => {
90
+ onRemoveScene: scenesCallback => {
91
91
  this.mainViewScenesLength = scenesCallback.scenes.length;
92
92
  callbacks.emit("mainViewScenesLengthChange", this.mainViewScenesLength);
93
93
  },
@@ -126,7 +126,7 @@ export class AppManager {
126
126
  public get uid() {
127
127
  return this.room?.uid || "";
128
128
  }
129
-
129
+
130
130
  public getMainViewSceneDir() {
131
131
  const scenePath = this.store.getMainViewScenePath();
132
132
  if (scenePath) {
@@ -186,6 +186,10 @@ export class AppManager {
186
186
  const focused = get(this.attributes, "focus");
187
187
  if (this._prevFocused !== focused) {
188
188
  this.boxManager?.focusBox({ appId: focused });
189
+ const appProxy = this.appProxies.get(focused);
190
+ if (appProxy) {
191
+ appRegister.notifyApp(appProxy.kind, "focus", { appId: focused });
192
+ }
189
193
  callbacks.emit("focusedChange", focused);
190
194
  this._prevFocused = focused;
191
195
  }
@@ -498,10 +502,6 @@ export class AppManager {
498
502
  }
499
503
  case "focus": {
500
504
  this.windowManger.safeSetAttributes({ focus: payload.appId });
501
- const appProxy = this.appProxies.get(payload.appId);
502
- if (appProxy) {
503
- appRegister.notifyApp(appProxy.kind, "focus", { appId: payload.appId });
504
- }
505
505
  break;
506
506
  }
507
507
  case "resize": {
@@ -42,6 +42,7 @@ export class CursorManager {
42
42
  if (payload.state === CursorState.Leave) {
43
43
  cursorInstance.leave();
44
44
  } else {
45
+ cursorInstance.setMember();
45
46
  cursorInstance.move(payload.position);
46
47
  }
47
48
  });
package/src/index.ts CHANGED
@@ -774,10 +774,6 @@ export class WindowManager extends InvisiblePlugin<WindowMangerAttributes> {
774
774
  }
775
775
  }
776
776
  }
777
-
778
- private _removeScenes = (scenePath: string) => {
779
- this.room.removeScenes(scenePath);
780
- };
781
777
  }
782
778
 
783
779
  setupBuiltin();