(space, metaWindow)
| 4404 | } |
| 4405 | |
| 4406 | export function updateSelection(space, metaWindow) { |
| 4407 | if (!metaWindow) { |
| 4408 | return; |
| 4409 | } |
| 4410 | let clone = metaWindow.clone; |
| 4411 | let cloneActor = clone.cloneActor; |
| 4412 | |
| 4413 | // first set all selections inactive |
| 4414 | // this means not active workspaces are shown as inactive |
| 4415 | setAllWorkspacesInactive(); |
| 4416 | |
| 4417 | // if metawindow has transient window(s) and it's NOT focused, |
| 4418 | // don't update visual selection (since transient is actually focused) |
| 4419 | if (hasTransient(metaWindow) && metaWindow !== display.focus_window) { |
| 4420 | space.setSelectionInactive(); |
| 4421 | } |
| 4422 | else { |
| 4423 | // then set the new selection active |
| 4424 | space.setSelectionActive(); |
| 4425 | } |
| 4426 | |
| 4427 | space.updateWindowPositionBar(); |
| 4428 | |
| 4429 | if (space.selection.get_parent() === clone) |
| 4430 | return; |
| 4431 | Utils.actor_reparent(space.selection, clone); |
| 4432 | clone.set_child_below_sibling(space.selection, cloneActor); |
| 4433 | allocateClone(metaWindow); |
| 4434 | } |
| 4435 | |
| 4436 | /** |
| 4437 | * Move the column containing @meta_window to x, y and propagate the change |
no test coverage detected