diff options
author | Lennart Poettering <lennart@poettering.net> | 2009-10-19 22:19:11 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-10-19 22:19:11 +0200 |
commit | 529849be8047a1c1426cf772cecf6566682cefd8 (patch) | |
tree | a8b81eec296f4b1bc4ed7a5fb3a64746e6528fa8 | |
parent | 74e34cd11610fd1d5d4341d18d667a456112c16a (diff) | |
download | libcanberra-529849be8047a1c1426cf772cecf6566682cefd8.tar.gz |
gtk: only use GdkEvent::window if it is set
-rw-r--r-- | src/canberra-gtk.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/canberra-gtk.c b/src/canberra-gtk.c index bddaed7..6d9a6d9 100644 --- a/src/canberra-gtk.c +++ b/src/canberra-gtk.c @@ -490,7 +490,11 @@ int ca_gtk_play_for_event(GdkEvent *e, uint32_t id, ...) { if (ret < 0) goto fail; - s = gdk_drawable_get_screen(GDK_DRAWABLE(e->any.window)); + if (e->any.window) + s = gdk_drawable_get_screen(GDK_DRAWABLE(e->any.window)); + else + s = gdk_screen_get_default(); + ret = ca_context_play_full(ca_gtk_context_get_for_screen(s), id, p, NULL, NULL); fail: |