From 66bac3eb8606ead677bc6bdd7b9f2b34bc5061ad Mon Sep 17 00:00:00 2001 From: Vineeth TM Date: Thu, 10 Mar 2016 08:50:28 +0900 Subject: [PATCH] d3dvideosink: post message to application for unhandled keyboard/mouse events https://bugzilla.gnome.org/show_bug.cgi?id=763403 --- sys/d3dvideosink/d3dvideosink.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/d3dvideosink/d3dvideosink.c b/sys/d3dvideosink/d3dvideosink.c index 3429531..d437470 100644 --- a/sys/d3dvideosink/d3dvideosink.c +++ b/sys/d3dvideosink/d3dvideosink.c @@ -597,7 +597,13 @@ gst_d3dvideosink_navigation_send_event (GstNavigation * navigation, if ((e = gst_event_new_navigation (structure))) { GstPad *pad; if ((pad = gst_pad_get_peer (GST_VIDEO_SINK_PAD (sink)))) { - gst_pad_send_event (pad, e); + if (!gst_pad_send_event (pad, gst_event_ref (e))) { + /* If upstream didn't handle the event we'll post a message with it + * for the application in case it wants to do something with it */ + gst_element_post_message (GST_ELEMENT_CAST (sink), + gst_navigation_message_new_event (GST_OBJECT_CAST (sink), e)); + } + gst_event_unref (e); gst_object_unref (pad); } } -- 2.7.4