gconf-settings/skel/.local/share/gnome-shell/extensions/unitehardpixel.eu/modules/activateWindow.js

19 lines
490 B
JavaScript
Raw Normal View History

2019-10-26 20:50:28 +00:00
const Main = imports.ui.main
const Unite = imports.misc.extensionUtils.getCurrentExtension()
const Base = Unite.imports.module.BaseModule
var ActivateWindow = class ActivateWindow extends Base {
_onSetup() {
this._enableKey = 'autofocus-windows'
this._enableValue = true
}
_onActivate() {
this._signals.connect(global.display, 'window-demands-attention', 'focusWindow')
}
_focusWindow(actor, win) {
Main.activateWindow(win, global.get_current_time())
}
}