( window: WaylandWindow, fromOffsetY: number, toOffsetY: number, fromOpacity: number, toOpacity: number, easing: EasingFunction, duration: number, )
| 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); |
no test coverage detected