[ui/gtk,02/13] Remove use of gdk_drawable_get_{screen, display}

Submitted by Daniel P. Berrange on Feb. 25, 2013, 3:20 p.m.

Details

Message ID 1361805646-6425-3-git-send-email-berrange@redhat.com
State New
Headers show

Commit Message

Daniel P. Berrange Feb. 25, 2013, 3:20 p.m.
From: "Daniel P. Berrange" <berrange@redhat.com>

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 <berrange@redhat.com>
---
 ui/gtk.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Patch hide | download patch | download mbox

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;