From 209b1ba383f59e1b398d3331d9fd9fcb7f0284a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Mon, 5 Oct 2020 09:25:58 +0200 Subject: [PATCH] clutter/frame-clock: Adapt refresh rate from to frame info We should update to whatever refresh rate that comes our way, in particular on X11, as this may change over time. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1430 --- clutter/clutter/clutter-frame-clock.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clutter/clutter/clutter-frame-clock.c b/clutter/clutter/clutter-frame-clock.c index 1fea057bd..3f3b9d9d8 100644 --- a/clutter/clutter/clutter-frame-clock.c +++ b/clutter/clutter/clutter-frame-clock.c @@ -197,6 +197,8 @@ clutter_frame_clock_notify_presented (ClutterFrameClock *frame_clock, frame_clock->last_presentation_time_us = g_get_monotonic_time (); } + frame_clock->refresh_rate = frame_info->refresh_rate; + switch (frame_clock->state) { case CLUTTER_FRAME_CLOCK_STATE_INIT: