Skip to content

eglfs: Fix crash when painting the mouse cursor in a multiscreen setup

Always make sure to initialize the OpenGL functions. Instead of relying on the shaderprogram initialization, which is bound to the current context, check for the d_ptr and initialize when not already done.

With this fix QEglFSCursor::draw works regardless of which context is current and checking for that is not needed anymore in paintOnScreen. This is important as the basic render loop only uses one context for painting on all screens, while the threaded render loop uses multiple contexts.

Pick-to: 6.4 6.3 6.2 5.15 Change-Id: I4ac2f5184c2fce27421e92efe1b7f635c71c0e92 Reviewed-by: Laszlo Agocs laszlo.agocs@qt.io (cherry picked from commit f9eb2a7b)

Merge request reports