keyboard: defer position-changed till we have a rect

Emitting it that soon results in JS warnings, as we don't have
everything in place yet. The position-changed signal will be
emitted from other locations as soon as we have it.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/464

Closes: #464
This commit is contained in:
Carlos Garnacho 2018-07-14 00:14:07 +02:00
parent 6b41f82346
commit 81956e9b84

View File

@ -526,9 +526,7 @@ var FocusTracker = new Lang.Class({
this._currentWindow = window; this._currentWindow = window;
if (window) { if (window) {
this._currentWindowPositionId = this._currentWindow.connect('position-changed', () => { this._currentWindowPositionId = this._currentWindow.connect('position-changed', () => {
if (global.display.get_grab_op() == Meta.GrabOp.NONE) if (global.display.get_grab_op() != Meta.GrabOp.NONE)
this.emit('position-changed');
else
this.emit('reset'); this.emit('reset');
}); });
} }