Skip to content

Force basic render loop on Wayland

Vlad Zahorodnii requested to merge work/zzag/wayland-basic-render-loop into master

In Qt 5, qtwayland can't ensure that the wl_surface lives as long as qtquick render thread needs it. If the wl_surface is destroyed while it's still being used, it will eventually lead to a crash.

It's fixed in Qt 6 using RHI abstractions. We tried to add equivalent QWaylandWindow::beginFrame() and QWaylandWindow::endFrame() functions, but that didn't work well. QOpenGLContext::makeCurrent() and QOpenGLContext::swapBuffers() don't cut for the task.

As a shortterm solution, this patch makes plasma-integration's qtquick settings module to force basic render loop on wayland. Threaded render loop is still used on X11.

BUG: 447717

Merge request reports

Loading