From patchwork Mon Feb 25 15:20:35 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: 222930 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 BA7002C02A3 for ; Tue, 26 Feb 2013 02:21:20 +1100 (EST) Received: from localhost ([::1]:58854 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9zri-0007hI-QN for incoming@patchwork.ozlabs.org; Mon, 25 Feb 2013 10:21:18 -0500 Received: from eggs.gnu.org ([208.118.235.92]:41397) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9zrP-0007ge-Jd for qemu-devel@nongnu.org; Mon, 25 Feb 2013 10:21:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9zrN-0007N2-RU for qemu-devel@nongnu.org; Mon, 25 Feb 2013 10:20:59 -0500 Received: from mx1.redhat.com ([209.132.183.28]:5877) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9zrN-0007Mw-Ig for qemu-devel@nongnu.org; Mon, 25 Feb 2013 10:20:57 -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 r1PFKvLi021417 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 25 Feb 2013 10:20:57 -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 r1PFKrXN032143; Mon, 25 Feb 2013 10:20:55 -0500 From: "Daniel P. Berrange" To: qemu-devel@nongnu.org Date: Mon, 25 Feb 2013 15:20:35 +0000 Message-Id: <1361805646-6425-3-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 02/13] Remove use of gdk_drawable_get_{screen, display} 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" The gdk_drawable_get_screen and gdk_drawable_get_display methods don't exist in GDK3. Fortunately, even on GTK2 they are not required - we can call the equivalent gtk_widget_get_screen/gtk_widget_get_display methods which have existed since GTK 2.2 Signed-off-by: Daniel P. Berrange --- ui/gtk.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index dfffbb8..8ccd95f 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -501,9 +501,8 @@ static gboolean gd_motion_event(GtkWidget *widget, GdkEventMotion *motion, } if (!kbd_mouse_is_absolute() && gd_is_grab_active(s)) { - GdkDrawable *drawable = GDK_DRAWABLE(gtk_widget_get_window(s->drawing_area)); - GdkDisplay *display = gdk_drawable_get_display(drawable); - GdkScreen *screen = gdk_drawable_get_screen(drawable); + GdkDisplay *display = gtk_widget_get_display(s->drawing_area); + GdkScreen *screen = gtk_widget_get_screen(s->drawing_area); int x = (int)motion->x_root; int y = (int)motion->y_root;