From patchwork Tue May 26 12:56:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 476443 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 7ADE71402B4 for ; Tue, 26 May 2015 22:59:50 +1000 (AEST) Received: from localhost ([::1]:47942 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxESS-0006H4-Ps for incoming@patchwork.ozlabs.org; Tue, 26 May 2015 08:59:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54824) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxEPc-0001KA-7Q for qemu-devel@nongnu.org; Tue, 26 May 2015 08:56:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YxEPY-0005zr-Tc for qemu-devel@nongnu.org; Tue, 26 May 2015 08:56:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56890) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxEPY-0005yb-HS for qemu-devel@nongnu.org; Tue, 26 May 2015 08:56:48 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 1DF7F2BB382 for ; Tue, 26 May 2015 12:56:48 +0000 (UTC) Received: from [10.36.116.59] (ovpn-116-59.ams2.redhat.com [10.36.116.59]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t4QCukUp027888; Tue, 26 May 2015 08:56:46 -0400 Message-ID: <1432645002.24602.9.camel@nilsson.home.kraxel.org> From: Gerd Hoffmann To: Max Reitz Date: Tue, 26 May 2015 14:56:42 +0200 In-Reply-To: <1432622125.28482.2.camel@nilsson.home.kraxel.org> References: <1432135182-29676-1-git-send-email-kraxel@redhat.com> <1432135182-29676-5-git-send-email-kraxel@redhat.com> <5560BC64.6060600@redhat.com> <1432622125.28482.2.camel@nilsson.home.kraxel.org> Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Paolo Bonzini , qemu-devel@nongnu.org Subject: Re: [Qemu-devel] [PATCH v2 4/5] gtk: add opengl support, using egl X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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: From 21b26f0f0bc57c209381fd13c7ca01ea97354dfc Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Tue, 26 May 2015 11:52:08 +0200 Subject: [PATCH] gtk: silence gtk_widget_set_double_buffered warning Signed-off-by: Gerd Hoffmann --- 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