keyboard: Stop offsetting the focus rectangle

The focus rectangle of the OSK currently gets stored with an offset that
removes the global coordinates and makes it window-local coordinates.
This offsetting has been applied since the introduction of the
FocusTracker with commit fc5ab44704 and it
seems there's no real reason for it.

By removing this, we also emit position-changed when the window has
moved but the window-local coordinates stayed the same. We really want
to emit position-changed in that case because it might affect whether
the window needs to be shifted up.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1728>
This commit is contained in:
Jonas Dreßler 2021-02-27 11:37:24 +01:00 committed by Marge Bot
parent 746230f8b6
commit b160e44dab

View File

@ -624,8 +624,6 @@ var FocusTracker = class {
const rectInsideFrameRect = grapheneFrameRect.intersection(rect)[0]; const rectInsideFrameRect = grapheneFrameRect.intersection(rect)[0];
if (!rectInsideFrameRect) if (!rectInsideFrameRect)
return; return;
rect.offset(-frameRect.x, -frameRect.y);
} }
if (this._rect && this._rect.equal(rect)) if (this._rect && this._rect.equal(rect))
@ -643,12 +641,6 @@ var FocusTracker = class {
height: this._rect.size.height, height: this._rect.size.height,
}; };
if (this._currentWindow) {
let frameRect = this._currentWindow.get_frame_rect();
rect.x += frameRect.x;
rect.y += frameRect.y;
}
return rect; return rect;
} }
}; };