( composition: WindowCompositionFunction, events: CompositorEventController, windowId: string, snapshot: WaylandWindowSnapshot, event: RuntimeWindowMaximizeRequestEvent, )
| 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 | |
| 2906 | function 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 | |
| 2923 | function summarizeSerializedLabels(node: unknown): unknown[] { |
| 2924 | const labels: unknown[] = []; |
no test coverage detected