diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js index d7c07c0c6..0f01589fd 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -550,7 +550,6 @@ var KeyboardModel = class { var FocusTracker = class { constructor() { - this._currentWindow = null; this._rect = null; this._notifyFocusId = global.display.connect('notify::focus-window', () => { @@ -558,6 +557,8 @@ var FocusTracker = class { this.emit('window-changed', this._currentWindow); }); + this._setCurrentWindow(global.display.focus_window); + this._grabOpBeginId = global.display.connect('grab-op-begin', (display, window, op) => { if (window == this._currentWindow && (op == Meta.GrabOp.MOVING || op == Meta.GrabOp.KEYBOARD_MOVING))