Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.8, 5.9
-
None
-
e0c30279ec1fad88346ed3fb483bc3c672fdd01b
Description
When using QQuickRenderControl to render QQuickItems to offscreen window, the events send to the controls in the items(generated by the application) are not sent to the items in the offscreen window, but instead to the visible application window item.
This was discovered when implementing render-qml-to-texture feature for Qt3D, where the application can specify qml or QQuickItem to render to texture and also use the controls in them, where the mouse events are generated from pick events from 3D scene.
This was still working a while ago, but not anymore. I turns out that the recent changes to QQuickWindow mouse grab handling breaks this, specifically reusing the QQuickPointerEvent in QQuickPointerDevice. This somehow causes the visible and offscreen windows to share the grabber item.
I was able to make it work again, by having window specific QQuickPointerEvent pointer and passing that to QQuickPointerDevice::pointerEvent, which allocates new device specific event if it is not already allocated(or the passed pointer if it has been allocated).
Attachments
Issue Links
- relates to
-
QTBUG-60123 [Linux]: When clicking a mouse area then it can end up getting a canceled signal instead of a released signal
- Closed