diff options
author | Ozan Çağlayan <ozancag@gmail.com> | 2013-04-23 13:03:22 +0300 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-04-23 10:37:32 -0500 |
commit | 571253d410d6050637ccd3b6c122a3ad61e2ab25 (patch) | |
tree | cdf85ce87998ba440f25124e46857d1e1dbff737 /ui/gtk.c | |
parent | 2cfd5cc06ab14879964c8bbd5595d416490605ea (diff) |
ui/gtk: Use gtk_widget_get_window() to support both gtk2 and gtk3
This fixes build with gtk+-3.0.
Signed-off-by: Ozan Çağlayan <ozancag@gmail.com>
Message-id: 1366711402-1750-1-git-send-email-ozancag@gmail.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'ui/gtk.c')
-rw-r--r-- | ui/gtk.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -337,7 +337,7 @@ static void gd_mouse_set(DisplayChangeListener *dcl, GtkDisplayState *s = container_of(dcl, GtkDisplayState, dcl); gint x_root, y_root; - gdk_window_get_root_coords(s->drawing_area->window, + gdk_window_get_root_coords(gtk_widget_get_window(s->drawing_area), x, y, &x_root, &y_root); gdk_display_warp_pointer(gtk_widget_get_display(s->drawing_area), gtk_widget_get_screen(s->drawing_area), @@ -357,7 +357,7 @@ static void gd_cursor_define(DisplayChangeListener *dcl, NULL, NULL); cursor = gdk_cursor_new_from_pixbuf(gtk_widget_get_display(s->drawing_area), pixbuf, c->hot_x, c->hot_y); - gdk_window_set_cursor(s->drawing_area->window, cursor); + gdk_window_set_cursor(gtk_widget_get_window(s->drawing_area), cursor); g_object_unref(pixbuf); g_object_unref(cursor); } |