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

Method scrollToWindow

packages/config/src/window-manager.ts:4198–4229  ·  view source on GitHub ↗
(
    window: WaylandWindow,
    options: { force?: boolean } = {},
  )

Source from the content-addressed store, hash-verified

4196 if (
4197 focused &&
4198 focused.id !== window.id &&
4199 this.areTransientRelatives(focused, window)
4200 ) {
4201 return undefined;
4202 }
4203
4204 if (read(window.isFocused)) {
4205 return undefined;
4206 }
4207
4208 if (this.shouldTile(window)) {
4209 const previousActiveWindowId = this.activeWindowId;
4210 this.activeWindowId = window.id;
4211 if (previousActiveWindowId !== window.id) {
4212 this.reapplyStaticManagedLayout();
4213 }
4214 }
4215 window.focus();
4216 return window;
4217 }
4218
4219 private areTransientRelatives(a: WaylandWindow, b: WaylandWindow): boolean {
4220 return (
4221 this.isTransientChildOf(a, b) ||
4222 this.isTransientChildOf(b, a) ||
4223 this.hasUnparentedTransientAffinity(a, b)
4224 );
4225 }
4226
4227 private isTransientChildOf(
4228 child: WaylandWindow,
4229 parent: WaylandWindow,
4230 ): boolean {
4231 return child.isTransient() && child.parentId() === parent.id;
4232 }

Callers 9

addWindowMethod · 0.95
moveFocusedTileMethod · 0.95
setTiledMethod · 0.95
resizeTileMethod · 0.95
updateTileDragMethod · 0.95
endTileDragMethod · 0.95
focusWindowMethod · 0.95
panToWindowMethod · 0.95
focusRelativeMethod · 0.95

Calls 7

stopKineticScrollMethod · 0.95
tileableWindowsMethod · 0.95
tileViewportRectMethod · 0.95
tileLeftForIndexMethod · 0.95
tileWidthForWindowMethod · 0.95
clampScrollOffsetMethod · 0.95
readFunction · 0.90

Tested by

no test coverage detected