From: "Ozan Çağlayan" <ozancag@gmail.com>
To: qemu-devel@nongnu.org
Cc: "Ozan Çağlayan" <ozancag@gmail.com>
Subject: [Qemu-devel] [PATCH] ui/gtk: Use gtk_widget_get_window() to support both gtk2 and gtk3
Date: Mon, 22 Apr 2013 19:34:26 +0300 [thread overview]
Message-ID: <1366648466-15064-1-git-send-email-ozancag@gmail.com> (raw)
This fixes build with gtk+-3.0.
---
ui/gtk.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ui/gtk.c b/ui/gtk.c
index b46997a..4110342 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -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);
}
--
1.8.2
next reply other threads:[~2013-04-22 16:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-22 16:34 Ozan Çağlayan [this message]
2013-04-24 18:24 ` [Qemu-devel] [PATCH] ui/gtk: Use gtk_widget_get_window() to support both gtk2 and gtk3 Anthony Liguori
-- strict thread matches above, loose matches on Subject: below --
2013-04-23 10:03 Ozan Çağlayan
2013-04-24 18:24 ` Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1366648466-15064-1-git-send-email-ozancag@gmail.com \
--to=ozancag@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).