[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 04/10] ui/gtk: Update the refresh rate for gl-area too
From: |
Gerd Hoffmann |
Subject: |
[PULL 04/10] ui/gtk: Update the refresh rate for gl-area too |
Date: |
Tue, 2 Nov 2021 17:26:13 +0100 |
From: Nikola Pavlica <pavlica.nikola@gmail.com>
This is a bugfix that stretches all the way back to January 2020,
where I initially introduced this problem and potential solutions.
A quick recap of the issue: QEMU did not sync up with the monitors
refresh rate causing the VM to render frames that were NOT displayed
to the user. That "fix" allowed QEMU to obtain the screen refreshrate
information from the system using GDK API's and was for GTK only.
Well, I'm back with the same issue again. But this time on Wayland.
And I did NOT realize there was YET another screen refresh rate
function, this time for Wayland specifically. Thankfully the fix was
simple and without much hassle.
Thanks,
Nikola
PS: It seems that my patch has gone missing from the mailing list,
hence I'm sending it again. Sorry for any inconveniences.
Signed-off-by: Nikola Pavlica <pavlica.nikola@gmail.com>
Message-Id: <20211024143110.704296-1-pavlica.nikola@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
ui/gtk-gl-area.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ui/gtk-gl-area.c b/ui/gtk-gl-area.c
index b23523748e7f..afcb29f65823 100644
--- a/ui/gtk-gl-area.c
+++ b/ui/gtk-gl-area.c
@@ -112,6 +112,9 @@ void gd_gl_area_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);
+
if (!vc->gfx.gls) {
if (!gtk_widget_get_realized(vc->gfx.drawing_area)) {
return;
--
2.31.1
- [PULL 00/10] Misc 20211102 patches, Gerd Hoffmann, 2021/11/02
- [PULL 02/10] MAINTAINERS: add myself as partial audio reviewer, Gerd Hoffmann, 2021/11/02
- [PULL 01/10] MAINTAINERS: Add myself as a reviewer for SDL audio, Gerd Hoffmann, 2021/11/02
- [PULL 04/10] ui/gtk: Update the refresh rate for gl-area too,
Gerd Hoffmann <=
- [PULL 05/10] ui/gtk: skip any extra draw of same guest scanout blob res, Gerd Hoffmann, 2021/11/02
- [PULL 09/10] hw/misc: deprecate the 'sga' device, Gerd Hoffmann, 2021/11/02
- [PULL 03/10] microvm: add device tree support., Gerd Hoffmann, 2021/11/02
- [PULL 07/10] ui/console: replace kbd_timer with chr_accept_input callback, Gerd Hoffmann, 2021/11/02
- [PULL 08/10] ui/console: remove chardev frontend connected test, Gerd Hoffmann, 2021/11/02
- [PULL 10/10] usb-storage: tag usb_msd_csw as packed struct, Gerd Hoffmann, 2021/11/02
- [PULL 06/10] ui/console: replace QEMUFIFO with Fifo8, Gerd Hoffmann, 2021/11/02
- Re: [PULL 00/10] Misc 20211102 patches, Richard Henderson, 2021/11/03