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

Function scheduleWorkspaceVisualAnimation

packages/config/src/window-manager.ts:4631–4664  ·  view source on GitHub ↗
(
  window: WaylandWindow,
  fromOffsetY: number,
  toOffsetY: number,
  fromOpacity: number,
  toOpacity: number,
  easing: EasingFunction,
  duration: number,
)

Source from the content-addressed store, hash-verified

4629 const active = this.windows.find(
4630 (window) => window.id === this.activeWindowId,
4631 );
4632 active?.focus();
4633 }
4634
4635 public shouldTile(window: WaylandWindow): boolean {
4636 return window.isResizable() && !window.isTransient();
4637 }
4638
4639 public reclassifyWindow(window: WaylandWindow, wasTileable: boolean) {
4640 if (!this.isTiled || !this.hasWindow(window)) {
4641 this.syncWindowVisibleOutputs(window);
4642 return;
4643 }
4644
4645 const isTileable = this.shouldTile(window);
4646 if (wasTileable === isTileable) {
4647 return;
4648 }
4649
4650 this.stopKineticScroll();
4651 let restoredInitialActiveWindowId: string | null | undefined;
4652 if (!isTileable) {
4653 const initialTileState = this.initialTileStateByWindowId.get(window.id);
4654 this.initialTileStateByWindowId.delete(window.id);
4655 if (initialTileState) {
4656 this.scrollOffset = initialTileState.scrollOffset;
4657 restoredInitialActiveWindowId = initialTileState.activeWindowId;
4658 }
4659 this.tileWidthByWindowId.delete(window.id);
4660 stopRectAnimation(window, WINDOW_STATE_RECT);
4661 // Removing this tile can clamp scrollOffset. Defer the floating content
4662 // coordinate until applyLayout has established that final offset.
4663 window.state[WINDOW_STATE_FLOATING_RECT].set(null);
4664
4665 if (this.activeWindowId === window.id) {
4666 // The slot this window has just vacated by ceasing to be tileable.
4667 const windowIndex = this.tileIndexOf(window.id);

Callers 1

Calls 3

scheduleAnimationMethod · 0.80
setMethod · 0.65

Tested by

no test coverage detected