From 34bf17ad2705601f12db12fa0d2e14cc6ded4f9a Mon Sep 17 00:00:00 2001 From: Sebastian Keller Date: Mon, 8 Nov 2021 05:00:47 +0100 Subject: [PATCH] magnifier: Remove call to dropped Clutter::get_default_frame_rate() Clutter::get_default_frame_rate() has been removed in mutter!2002, but it is still being used here. Given that this was basically hardcoded to 60 in mutter with the only way of changing this being an obscure environment variable, just use that value here directly. This avoids a crash when starting gnome-shell with the magnifier enabled. Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4761 Part-of: --- js/ui/magnifier.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ui/magnifier.js b/js/ui/magnifier.js index 2443248d3..e68dc84f0 100644 --- a/js/ui/magnifier.js +++ b/js/ui/magnifier.js @@ -200,7 +200,7 @@ var Magnifier = class Magnifier { */ startTrackingMouse() { if (!this._pointerWatch) { - let interval = 1000 / Clutter.get_default_frame_rate(); + let interval = 1000 / 60; this._pointerWatch = PointerWatcher.getPointerWatcher().addWatch(interval, this.scrollToMousePos.bind(this)); } }