From: Gerd Hoffmann <kraxel@redhat.com>
To: Max Reitz <mreitz@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 4/5] gtk: add opengl support, using egl
Date: Tue, 26 May 2015 14:56:42 +0200 [thread overview]
Message-ID: <1432645002.24602.9.camel@nilsson.home.kraxel.org> (raw)
In-Reply-To: <1432622125.28482.2.camel@nilsson.home.kraxel.org>
[-- Attachment #1: Type: text/plain, Size: 381 bytes --]
On Di, 2015-05-26 at 08:35 +0200, Gerd Hoffmann wrote:
> Hi,
>
> > only). That, or pass -Wno-deprecated-declarations for compiling
> > ui/gtk.c, but that seems very ugly to me.
>
> We can also try some #pragma warn dance, to limit the
> -Wno-deprecated-declarations to a small code block.
>
> We have something simliar already for a bug in the gtk2 headers.
i.e. like this:
[-- Attachment #2: Type: text/x-patch, Size: 1232 bytes --]
>From 21b26f0f0bc57c209381fd13c7ca01ea97354dfc Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <kraxel@redhat.com>
Date: Tue, 26 May 2015 11:52:08 +0200
Subject: [PATCH] gtk: silence gtk_widget_set_double_buffered warning
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
ui/gtk.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/ui/gtk.c b/ui/gtk.c
index 0b87aa6..126326a 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -1739,7 +1739,20 @@ static GSList *gd_vc_gfx_init(GtkDisplayState *s, VirtualConsole *vc,
#if defined(CONFIG_OPENGL)
if (display_opengl) {
+ /*
+ * gtk_widget_set_double_buffered() was deprecated in 3.14.
+ * It is required for opengl rendering on X11 though. A
+ * proper replacement (native opengl support) is only
+ * available in 3.16+. Silence the warning if possible.
+ */
+#ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
gtk_widget_set_double_buffered(vc->gfx.drawing_area, FALSE);
+#ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE
+#pragma GCC diagnostic pop
+#endif
vc->gfx.dcl.ops = &dcl_egl_ops;
} else
#endif
--
1.8.3.1
next prev parent reply other threads:[~2015-05-26 12:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-20 15:19 [Qemu-devel] [PATCH v2 0/5] gtk: add opengl support Gerd Hoffmann
2015-05-20 15:19 ` [Qemu-devel] [PATCH v2 1/5] ui: use libexpoxy Gerd Hoffmann
2015-05-20 15:19 ` [Qemu-devel] [PATCH v2 2/5] ui: shader.h protect against double inclusion Gerd Hoffmann
2015-05-20 15:19 ` [Qemu-devel] [PATCH v2 3/5] ui: add egl-helpers Gerd Hoffmann
2015-05-23 17:36 ` Max Reitz
2015-05-20 15:19 ` [Qemu-devel] [PATCH v2 4/5] gtk: add opengl support, using egl Gerd Hoffmann
2015-05-23 17:44 ` Max Reitz
2015-05-26 6:35 ` Gerd Hoffmann
2015-05-26 12:56 ` Gerd Hoffmann [this message]
2015-05-26 14:06 ` Max Reitz
2015-05-26 14:12 ` Gerd Hoffmann
2015-05-20 15:19 ` [Qemu-devel] [PATCH v2 5/5] gtk: Replace gdk_cursor_new() Gerd Hoffmann
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=1432645002.24602.9.camel@nilsson.home.kraxel.org \
--to=kraxel@redhat.com \
--cc=mreitz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).