(
window: WaylandWindow,
options: { force?: boolean } = {},
)
| 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 | } |
no test coverage detected