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

Method tileWidthForWindow

packages/config/src/window-manager.ts:4243–4262  ·  view source on GitHub ↗
(
    window: WaylandWindow,
    viewportRect: ManagedWindowRect,
  )

Source from the content-addressed store, hash-verified

4241 this.scrollToWindow(window);
4242 }
4243 this.applyLayout();
4244 if (!cancelled && this.isActive()) {
4245 window.focus();
4246 }
4247 }
4248
4249 public focusWindow(window: WaylandWindow) {
4250 if (!this.shouldTile(window)) {
4251 return;
4252 }
4253 if (this.activeWindowId === window.id) {
4254 return;
4255 }
4256 this.activeWindowId = window.id;
4257 this.scrollToWindow(window);
4258 this.applyLayout();
4259 }
4260
4261 /**
4262 * "Go to this window": center the target in the viewport (overriding the
4263 * normal `scrollToWindow` which is a no-op when already visible) and animate
4264 * the layout. Used by dock clicks and any other "jump to window" gesture.
4265 */

Callers 5

applyLayoutMethod · 0.95
scrollToWindowMethod · 0.95
tileLeftForIndexMethod · 0.95
tileContentWidthMethod · 0.95

Calls 6

defaultTileWidthMethod · 0.95
minTileWidthMethod · 0.95
maxTileWidthMethod · 0.95
readFunction · 0.90
clampFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected