MCPcopy Create free account
hub / github.com/bea4dev/ShojiWM / invokeWindowMaximizeRequest

Function invokeWindowMaximizeRequest

tools/decoration-runtime.ts:2893–2921  ·  view source on GitHub ↗
(
  composition: WindowCompositionFunction,
  events: CompositorEventController,
  windowId: string,
  snapshot: WaylandWindowSnapshot,
  event: RuntimeWindowMaximizeRequestEvent,
)

Source from the content-addressed store, hash-verified

2891 const selected: string[] = [];
2892 for (const nodeId of sorted) {
2893 if (
2894 selected.some(
2895 (ancestor) =>
2896 nodeId === ancestor || nodeId.startsWith(`${ancestor}.`),
2897 )
2898 ) {
2899 continue;
2900 }
2901 selected.push(nodeId);
2902 }
2903 return selected;
2904}
2905
2906function findSerializedNode(tree: unknown, nodeId: string): unknown {
2907 if (!tree || typeof tree !== "object") {
2908 return undefined;
2909 }
2910 const node = tree as { nodeId?: unknown; children?: unknown[] };
2911 if (node.nodeId === nodeId) {
2912 return tree;
2913 }
2914 for (const child of node.children ?? []) {
2915 const found = findSerializedNode(child, nodeId);
2916 if (found !== undefined) {
2917 return found;
2918 }
2919 }
2920 return undefined;
2921}
2922
2923function summarizeSerializedLabels(node: unknown): unknown[] {
2924 const labels: unknown[] = [];

Callers 1

mainFunction · 0.85

Calls 5

hasActiveAnimationsFunction · 0.90
ensureRuntimeCacheEntryFunction · 0.85

Tested by

no test coverage detected