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

Method moveToMonitor

packages/config/src/window-manager.ts:2915–2939  ·  view source on GitHub ↗
(monitor: string, index: number)

Source from the content-addressed store, hash-verified

2913 case "right":
2914 return { x: rightX, y: by, width: halfW, height: bh };
2915 case "top-left":
2916 return { x: bx, y: by, width: halfW, height: halfH };
2917 case "top-right":
2918 return { x: rightX, y: by, width: halfW, height: halfH };
2919 case "bottom-left":
2920 return { x: bx, y: bottomY, width: halfW, height: halfH };
2921 case "bottom-right":
2922 return { x: rightX, y: bottomY, width: halfW, height: halfH };
2923 }
2924 }
2925
2926 private resizeFloatingSnapLayout(
2927 event: WindowResizeEvent,
2928 workspace: Workspace,
2929 nextRect: ManagedWindowRect,
2930 ): boolean {
2931 if (workspace.isTiled) {
2932 return false;
2933 }
2934
2935 const zone = event.window.state[WINDOW_STATE_SNAP_ZONE]();
2936 if (!isLayoutSnapZone(zone)) {
2937 return false;
2938 }
2939
2940 const monitor =
2941 event.window.state[WINDOW_STATE_SNAP_MONITOR]() || workspace.monitor;
2942 const base = this.monitorSnapBaseRect(monitor);

Callers 1

onOutputChangeMethod · 0.80

Calls 6

fullscreenRootRectMethod · 0.95
shouldTileMethod · 0.95
clampRectToViewportMethod · 0.95
setMethod · 0.65

Tested by

no test coverage detected