summaryrefslogtreecommitdiff
path: root/src/canberra-gtk.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2010-09-27 16:43:37 -0400
committerLennart Poettering <lennart@poettering.net>2010-09-27 23:17:45 +0200
commit1cea6c4528d069a2c77ec42ef305545b9e9609b7 (patch)
tree58cf4f7d164905b27f357e0e9c143b49bfc33afa /src/canberra-gtk.c
parent3f3b8de37b3018c9f5780598dbf8242be2d4f2a1 (diff)
gtk: Fix the build with current GTK+
gdk_drawable_get_screen has been removed in GTK3. Instead, use gdk_window_get_screen.
Diffstat (limited to 'src/canberra-gtk.c')
-rw-r--r--src/canberra-gtk.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/canberra-gtk.c b/src/canberra-gtk.c
index fffcfef..34446f5 100644
--- a/src/canberra-gtk.c
+++ b/src/canberra-gtk.c
@@ -505,7 +505,11 @@ int ca_gtk_play_for_event(GdkEvent *e, uint32_t id, ...) {
goto fail;
if (e->any.window)
+#if GTK_CHECK_VERSION (2, 90, 7)
+ s = gdk_window_get_screen(e->any.window);
+#else
s = gdk_drawable_get_screen(GDK_DRAWABLE(e->any.window));
+#endif
else
s = gdk_screen_get_default();