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

Method applyFloatingLayout

packages/config/src/window-manager.ts:4079–4119  ·  view source on GitHub ↗
(
    animationOptions: LayoutOptions | undefined,
    animate = true,
  )

Source from the content-addressed store, hash-verified

4077 window.state[WINDOW_STATE_WORKSPACE_OFFSET_Y].set(0);
4078 window.state[WINDOW_STATE_WORKSPACE_OPACITY].set(1);
4079 this.setTileWidthFromRect(window, window.state[WINDOW_STATE_RECT](), false);
4080 stopRectAnimation(window, WINDOW_STATE_RECT);
4081 window.state[WINDOW_STATE_RECT].set(rect);
4082 this.applyLayout();
4083 }
4084
4085 public adoptTileDragWindow(window: WaylandWindow, rect: ManagedWindowRect) {
4086 if (!this.hasWindow(window)) {
4087 this.windows.push(window);
4088 }
4089 const visible = this.isActive();
4090 this.activeWindowId = window.id;
4091 this.draggingWindowId = window.id;
4092 this.setTileWidthFromRect(window, rect, false);
4093 window.state[WINDOW_STATE_TILE_DRAGGING].set(true);
4094 this.syncWindowVisibleOutputs(window);
4095 window.state[WINDOW_STATE_WORKSPACE_VISIBLE].set(true);
4096 window.state[WINDOW_STATE_WORKSPACE_OFFSET_Y].set(0);
4097 window.state[WINDOW_STATE_WORKSPACE_OPACITY].set(visible ? 1 : 0);
4098 stopRectAnimation(window, WINDOW_STATE_RECT);
4099 window.state[WINDOW_STATE_RECT].set(rect);
4100 }
4101
4102 public adoptFloatingWindow(window: WaylandWindow, rect: ManagedWindowRect) {
4103 if (!this.hasWindow(window)) {
4104 this.windows.push(window);
4105 }
4106 const visible = this.isActive();
4107 this.activeWindowId = window.id;
4108 this.syncWindowVisibleOutputs(window);
4109 resetWorkspaceVisualState(window, visible);
4110 window.state[WINDOW_STATE_FLOATING_RECT].set(
4111 this.isTiled ? this.viewportRectToFloatingContentRect(rect) : rect,
4112 );
4113 stopRectAnimation(window, WINDOW_STATE_RECT);
4114 window.state[WINDOW_STATE_RECT].set(rect);
4115 }
4116
4117 public updateTileDrag(
4118 window: WaylandWindow,
4119 rect: ManagedWindowRect,
4120 pointerX: number,
4121 ) {
4122 if (this.draggingWindowId !== window.id) {

Callers 1

applyLayoutMethod · 0.95

Calls 8

floatingWindowsMethod · 0.95
centeredFloatingRectMethod · 0.95
playRectAnimationFunction · 0.90
stopRectAnimationFunction · 0.90
hotReloadDebugFunction · 0.85
setMethod · 0.65

Tested by

no test coverage detected