* Activates this space. Safer alternative to space.workspace.activate_with_focus. Also allows * setting animation on workspaceSwitch. * @param {Boolean} animate
(metaWindow, defaultAnimation = true, paperwmAnimation = false)
| 475 | * @param {Boolean} animate |
| 476 | */ |
| 477 | activateWithFocus(metaWindow, defaultAnimation = true, paperwmAnimation = false) { |
| 478 | spaces.space_defaultAnimation = defaultAnimation; |
| 479 | spaces.space_paperwmAnimation = paperwmAnimation; |
| 480 | |
| 481 | if (metaWindow) { |
| 482 | this.workspace.activate_with_focus(metaWindow, global.get_current_time()); |
| 483 | } |
| 484 | else { |
| 485 | this.workspace.activate(global.get_current_time()); |
| 486 | } |
| 487 | spaces.space_defaultAnimation = true; |
| 488 | spaces.space_paperwmAnimation = false; // switch to default |
| 489 | } |
| 490 | |
| 491 | show() { |
| 492 | if (this._visible) |
no test coverage detected