From: Nikola Pavlica <pavlica.nikola@gmail.com>
To: qemu-devel@nongnu.org, qemu-devel@nongnu.com
Cc: r_qemu@t-online.de, philmd@redhat.com, kraxel@redhat.com,
Nikola Pavlica <pavlica.nikola@gmail.com>
Subject: [PATCH 1/2] ui/gtk: expose gd_monitor_update_interval
Date: Thu, 14 Jan 2021 14:48:50 +0100 [thread overview]
Message-ID: <20210114134851.292767-2-pavlica.nikola@gmail.com> (raw)
In-Reply-To: <20210114134851.292767-1-pavlica.nikola@gmail.com>
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: Nikola Pavlica <pavlica.nikola@gmail.com>
---
include/ui/gtk.h | 1 +
ui/gtk.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/ui/gtk.h b/include/ui/gtk.h
index 80851fb4c7..3f395d7f94 100644
--- a/include/ui/gtk.h
+++ b/include/ui/gtk.h
@@ -86,6 +86,7 @@ extern bool gtk_use_gl_area;
/* ui/gtk.c */
void gd_update_windowsize(VirtualConsole *vc);
+int gd_monitor_update_interval(GtkWidget *widget);
/* ui/gtk-egl.c */
void gd_egl_init(VirtualConsole *vc);
diff --git a/ui/gtk.c b/ui/gtk.c
index d2004a4dc1..26665cd2e6 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -752,7 +752,7 @@ static void gd_resize_event(GtkGLArea *area,
* If available, return the update interval of the monitor in ms,
* else return 0 (the default update interval).
*/
-static int gd_monitor_update_interval(GtkWidget *widget)
+int gd_monitor_update_interval(GtkWidget *widget)
{
#ifdef GDK_VERSION_3_22
GdkWindow *win = gtk_widget_get_window(widget);
--
2.30.0
next prev parent reply other threads:[~2021-01-14 13:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-14 13:48 [PATCH 0/2] ui/gtk: run gd_monitor_update_interval on EGL as well Nikola Pavlica
2021-01-14 13:48 ` Nikola Pavlica [this message]
2021-01-14 13:48 ` [PATCH 2/2] ui/gtk: update monitor interval on egl displays Nikola Pavlica
-- strict thread matches above, loose matches on Subject: below --
2021-01-14 14:01 [PATCH 0/2] ui/gtk: Update refresh rate on EGL as well Nikola Pavlica
2021-01-14 14:01 ` [PATCH 1/2] ui/gtk: expose gd_monitor_update_interval Nikola Pavlica
2021-01-14 13:45 [PATCH 0/2] ui/gtk: run gd_monitor_update_interval on EGL as well Nikola Pavlica
2021-01-14 13:45 ` [PATCH 1/2] ui/gtk: expose gd_monitor_update_interval Nikola Pavlica
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210114134851.292767-2-pavlica.nikola@gmail.com \
--to=pavlica.nikola@gmail.com \
--cc=kraxel@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.com \
--cc=qemu-devel@nongnu.org \
--cc=r_qemu@t-online.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).