aboutsummaryrefslogtreecommitdiff
path: root/ui/gtk-egl.c
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki@gmail.com>2022-02-26 20:55:15 +0900
committerGerd Hoffmann <kraxel@redhat.com>2022-06-14 10:34:37 +0200
commitaeffd071ed818fa83c723fe8e2715144ee8385c7 (patch)
treeb06d72863abc92d4625754855ee9aab6c73587f7 /ui/gtk-egl.c
parent362239c05f28e8185d00d66884729a726ec4d226 (diff)
downloadqemu-aeffd071ed818fa83c723fe8e2715144ee8385c7.zip
qemu-aeffd071ed818fa83c723fe8e2715144ee8385c7.tar.gz
qemu-aeffd071ed818fa83c723fe8e2715144ee8385c7.tar.bz2
ui: Deliver refresh rate via QemuUIInfo
This change adds a new member, refresh_rate to QemuUIInfo in include/ui/console.h. It represents the refresh rate of the physical display backend, and it is more appropriate than GUI update interval as the refresh rate which the emulated device reports: - sdl may set GUI update interval shorter than the refresh rate of the physical display to respond to user-generated events. - sdl and vnc aggressively changes GUI update interval, but a guests is typically not designed to respond to frequent refresh rate changes, or frequent "display mode" changes in general. The frequency of refresh rate changes of the physical display backend matches better to the guest's expectation. QemuUIInfo also has other members representing "display mode", which makes it suitable for refresh rate representation. It has a throttling of update notifications, and prevents frequent changes of the display mode. Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com> Message-Id: <20220226115516.59830-3-akihiko.odaki@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui/gtk-egl.c')
-rw-r--r--ui/gtk-egl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
index e3bd4bc..b5bffba 100644
--- a/ui/gtk-egl.c
+++ b/ui/gtk-egl.c
@@ -140,8 +140,8 @@ void gd_egl_refresh(DisplayChangeListener *dcl)
{
VirtualConsole *vc = container_of(dcl, VirtualConsole, gfx.dcl);
- vc->gfx.dcl.update_interval = gd_monitor_update_interval(
- vc->window ? vc->window : vc->gfx.drawing_area);
+ gd_update_monitor_refresh_rate(
+ vc, vc->window ? vc->window : vc->gfx.drawing_area);
if (!vc->gfx.esurface) {
gd_egl_init(vc);