magnifier: Update zoom region right after enabling the magnifier

We want the zoom region to always be where the mouse cursor is, so make
sure to update it initially, too.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2234>
This commit is contained in:
Jonas Dreßler 2022-03-08 12:55:00 +01:00 committed by Marge Bot
parent f13a6145fd
commit 7bf8f40c84

View File

@ -215,6 +215,8 @@ var Magnifier = class Magnifier {
if (!this._pointerWatch) {
let interval = 1000 / 60;
this._pointerWatch = PointerWatcher.getPointerWatcher().addWatch(interval, this.scrollToMousePos.bind(this));
this.scrollToMousePos();
}
}