GNOME Bugzilla – Bug 791615
No events received if ButtonPressMask is set in XSelectInput for Qt Window
Last modified: 2018-02-05 10:38:30 UTC
Hi, If you take an example "GstVideoOverlay and Qt" from https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/GstVideoOverlay.html and use vaapisink instead of xvimagesink GstElement *sink = gst_element_factory_make ("vaapisink", NULL); Nothing will be rendered/showed up. It is related to gst_vaapisink_x11_pre_start_event_thread() static const int x11_event_mask = (KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | PointerMotionMask | ExposureMask | StructureNotifyMask); If ButtonPressMask is set for "foreign" (like in Qt example) window, no events will be received in gst_vaapisink_x11_handle_events() Is it really needed to request ButtonPress events for not internal windows?
It is an issue due to: > Only one client at a time can select a ButtonPress event, which is associated with the event mask ButtonPressMask. And QWindow does subscribe to receive a ButtonPress event, and this avoids receiving _any_ events by vaapisink.
Hi, Sorry for the late reply. Can you post a patch to fix this issue? Seems correct your intuition. Can you give it a try?
Created attachment 367794 [details] [review] Do not subscribe to ButtonPress events for foreign windows
committed in master * 76dbc3e9 vaapisink: don't mask button events for foreign windows