diff --git a/widgets/X11Renderer.cpp b/widgets/X11Renderer.cpp index d2dd019e0..f008f2d8e 100644 --- a/widgets/X11Renderer.cpp +++ b/widgets/X11Renderer.cpp @@ -464,6 +464,13 @@ void X11Renderer::drawFrame() { // TODO: interop DPTR_D(X11Renderer); + if (!d.resizeXImage(d.current_index)) + return; + if (preferredPixelFormat() != d.pixfmt) { + qDebug() << "x11 preferred pixel format: " << d.pixfmt; + setPreferredPixelFormat(d.pixfmt); + } + if (d.use_shm) { int wait_count = 0; while (d.ShmCompletionWaitCount >= kPoolSize) { @@ -483,13 +490,6 @@ void X11Renderer::drawFrame() usleep(1000); } } - - if (!d.resizeXImage(d.current_index)) - return; - if (preferredPixelFormat() != d.pixfmt) { - qDebug() << "x11 preferred pixel format: " << d.pixfmt; - setPreferredPixelFormat(d.pixfmt); - } QRect roi = realROI(); XImage* ximage = d.ximage_pool[d.current_index]; if (d.use_shm) {