summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVaL Doroshchuk <valkov@yandex.ru>2018-02-02 08:54:00 +0000
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2018-02-05 11:36:35 +0100
commit76dbc3e971a7a3416544df0ada1ff9d219c1c30e (patch)
treee08b36ed8f9a7375d7b902e9ca43aba6203af132
parent58043ff62c5116dc7af191c230404e70ebb6d9ff (diff)
vaapisink: don't mask button events for foreign windows
Don't subscribe to button press events when using a foreing window, because the user created window would trap those events, preveting the show of frames. https://bugzilla.gnome.org/show_bug.cgi?id=791615
-rw-r--r--gst/vaapi/gstvaapisink.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gst/vaapi/gstvaapisink.c b/gst/vaapi/gstvaapisink.c
index 8bd83030..c57b1261 100644
--- a/gst/vaapi/gstvaapisink.c
+++ b/gst/vaapi/gstvaapisink.c
@@ -448,9 +448,11 @@ gst_vaapisink_x11_pre_start_event_thread (GstVaapiSink * sink)
{
GstVaapiDisplayX11 *const display =
GST_VAAPI_DISPLAY_X11 (GST_VAAPI_PLUGIN_BASE_DISPLAY (sink));
- static const int x11_event_mask = (KeyPressMask | KeyReleaseMask |
- ButtonPressMask | ButtonReleaseMask | PointerMotionMask |
- ExposureMask | StructureNotifyMask);
+ int x11_event_mask = (KeyPressMask | KeyReleaseMask |
+ PointerMotionMask | ExposureMask | StructureNotifyMask);
+
+ if (!sink->foreign_window)
+ x11_event_mask |= ButtonPressMask | ButtonReleaseMask;
if (sink->window) {
gst_vaapi_display_lock (GST_VAAPI_DISPLAY (display));