MCPcopy
hub / github.com/paperwm/PaperWM / activateWithFocus

Method activateWithFocus

tiling.js:477–489  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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)

Callers 6

createBackgroundMethod · 0.95
destroyMethod · 0.80
initMethod · 0.80
switchMonitorMethod · 0.80
insertWindowFunction · 0.80

Calls 1

activateMethod · 0.45

Tested by

no test coverage detected