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
{
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));