[gnome-shell] magnifier: Remove call to dropped Clutter::get_default_frame_rate()



commit 34bf17ad2705601f12db12fa0d2e14cc6ded4f9a
Author: Sebastian Keller <skeller gnome org>
Date:   Mon Nov 8 05:00:47 2021 +0100

    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: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2025>

 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 2443248d34..e68dc84f0e 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));
         }
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]