diff --git a/plugins/platforms/wayland/egl_wayland_backend.cpp b/plugins/platforms/wayland/egl_wayland_backend.cpp index c0a74693aa..803f7c694c 100644 --- a/plugins/platforms/wayland/egl_wayland_backend.cpp +++ b/plugins/platforms/wayland/egl_wayland_backend.cpp @@ -327,10 +327,14 @@ void EglWaylandBackend::presentOnSurface(EglWaylandOutput *output, const QRegion if (supportsSwapBuffersWithDamage() && !output->m_damageHistory.isEmpty()) { QVector rects = regionToRects(output->m_damageHistory.constFirst(), waylandOutput); - eglSwapBuffersWithDamageEXT(eglDisplay(), output->m_eglSurface, - rects.data(), rects.count()/4); + if (!eglSwapBuffersWithDamageEXT(eglDisplay(), output->m_eglSurface, + rects.data(), rects.count() / 4)) { + qCCritical(KWIN_WAYLAND_BACKEND, "eglSwapBuffersWithDamage() failed: %x", eglGetError()); + } } else { - eglSwapBuffers(eglDisplay(), output->m_eglSurface); + if (!eglSwapBuffers(eglDisplay(), output->m_eglSurface)) { + qCCritical(KWIN_WAYLAND_BACKEND, "eglSwapBuffers() failed: %x", eglGetError()); + } } if (supportsBufferAge()) {