From patchwork Mon Feb 25 15:20:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= X-Patchwork-Id: 222958 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 238C32C0299 for ; Tue, 26 Feb 2013 03:26:01 +1100 (EST) Received: from localhost ([::1]:60578 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9zs0-0000Ek-PA for incoming@patchwork.ozlabs.org; Mon, 25 Feb 2013 10:21:36 -0500 Received: from eggs.gnu.org ([208.118.235.92]:41411) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9zrQ-0007go-Vh for qemu-devel@nongnu.org; Mon, 25 Feb 2013 10:21:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9zrM-0007Mb-8g for qemu-devel@nongnu.org; Mon, 25 Feb 2013 10:21:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40109) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9zrM-0007ME-1J for qemu-devel@nongnu.org; Mon, 25 Feb 2013 10:20:56 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r1PFKtwZ021399 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 25 Feb 2013 10:20:55 -0500 Received: from t500wlan.home.berrange.com.com (vpn1-4-92.ams2.redhat.com [10.36.4.92]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r1PFKrXM032143; Mon, 25 Feb 2013 10:20:54 -0500 From: "Daniel P. Berrange" To: qemu-devel@nongnu.org Date: Mon, 25 Feb 2013 15:20:34 +0000 Message-Id: <1361805646-6425-2-git-send-email-berrange@redhat.com> In-Reply-To: <1361805646-6425-1-git-send-email-berrange@redhat.com> References: <1361805646-6425-1-git-send-email-berrange@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH ui/gtk 01/13] Add compat for gdk_drawable_get_size on GTK3 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 From: "Daniel P. Berrange" GTK3 lacks the gdk_drawable_get_size method, so we create a stub impl which gets the get_width/get_height mehtods instead Signed-off-by: Daniel P. Berrange --- ui/gtk.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ui/gtk.c b/ui/gtk.c index dcce36d..dfffbb8 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -74,6 +74,16 @@ #define MAX_VCS 10 + +/* Compatibility define to let us build on both Gtk2 and Gtk3 */ +#if GTK_CHECK_VERSION(3, 0, 0) +static inline void gdk_drawable_get_size(GdkWindow *w, gint *ww, gint *wh) +{ + *ww = gdk_window_get_width(w); + *wh = gdk_window_get_height(w); +} +#endif + typedef struct VirtualConsole { GtkWidget *menu_item;