diff options
| -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:  | 
