Skip to content
Snippets Groups Projects
  1. Jan 15, 2021
    • Nikola Pavlica's avatar
      ui/gtk: update monitor interval on egl displays · cab82424
      Nikola Pavlica authored
      
      When running QEMU's GTK UI without EGL or OGL, the
      gd_monitor_update_interval function gets executed and the display refresh
      rate gets updated accordingly. However, when using EGL or just regular
      OGL, the function never gets executed.
      
      Which is why I decided that the function should be in gd_egl_refresh
      where the display output gets updated, in the same vain as how it's done
      for normal GTK UIs (aka. those without EGL) - in it's display refresh
      function.
      
      Since the gd_monitor_update_interval function now is exposed, we are
      going to use it to update the refresh rate.
      
      Signed-off-by: default avatarNikola Pavlica <pavlica.nikola@gmail.com>
      Message-Id: <20210114140153.301473-3-pavlica.nikola@gmail.com>
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      cab82424
    • Nikola Pavlica's avatar
      ui/gtk: expose gd_monitor_update_interval · 0fdc9977
      Nikola Pavlica authored
      
      The gd_egl_refresh function, as the name suggests, is responsible for
      refreshing displays when using EGL graphics with QEMU's GTK UI. This is
      a perfect candidate for a function to update the refresh rate in.
      
      Since gd_monitor_update_interval is inaccessible from the gd_egl_refresh
      function, we need to expose/globalize it in the include/ui/gtk.h file.
      
      Signed-off-by: default avatarNikola Pavlica <pavlica.nikola@gmail.com>
      Message-Id: <20210114140153.301473-2-pavlica.nikola@gmail.com>
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      0fdc9977
    • Volker Rümelin's avatar
      ui/gtk: limit virtual console max update interval · 3c4b8f83
      Volker Rümelin authored
      Limit the virtual console maximum update interval to
      GUI_REFRESH_INTERVAL_DEFAULT. This papers over a integer
      overflow bug in gtk3 on Windows where the reported monitor
      refresh frequency can be much smaller than the real refresh
      frequency.
      
      The gtk bug report can be found here:
      https://gitlab.gnome.org/GNOME/gtk/-/issues/3394
      
      
      
      On my Windows 10 system gtk reports a monitor refresh rate of
      1.511Hz instead of 60.031Hz and slows down the screen update
      rate in qemu to a crawl. Provided you are affected by the gtk
      bug on Windows, these are the steps to reproduce the issue:
      
      Start qemu with -display gtk and activate all qemu virtual
      consoles and notice the reduced qemu refresh rate. Activating
      all virtual consoles is necessary, because gui_update() in
      ui/console.c uses the minimum of all display change listeners
      update interval and not yet activated virtual consoles report
      the default update interval (30ms).
      
      Signed-off-by: default avatarVolker Rümelin <vr_qemu@t-online.de>
      Message-Id: <20201213165724.13418-3-vr_qemu@t-online.de>
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      3c4b8f83
    • Volker Rümelin's avatar
      ui/gtk: rename variable window to widget · 0431e369
      Volker Rümelin authored
      
      The type of the variable window is GtkWidget. Rename the variable
      from window to widget, because windows and widgets are different
      things.
      
      Signed-off-by: default avatarVolker Rümelin <vr_qemu@t-online.de>
      Message-Id: <20201213165724.13418-2-vr_qemu@t-online.de>
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      0431e369
    • Volker Rümelin's avatar
      ui/gtk: don't try to redefine SI prefixes · e80be993
      Volker Rümelin authored
      
      Redefining SI prefixes is always wrong. 1s has per definition
      1000ms. Remove the misnamed named constant and replace it with
      a comment explaining the frequency to period conversion in two
      simple steps. Now you can cancel out the unit mHz in the comment
      with the implicit unit mHz in refresh_rate_millihz and see why
      the implicit unit ms for update_interval remains.
      
      Signed-off-by: default avatarVolker Rümelin <vr_qemu@t-online.de>
      Message-Id: <20201213165724.13418-1-vr_qemu@t-online.de>
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      e80be993
  2. Jan 13, 2021
  3. Jan 12, 2021
Loading