platforms/wayland: Report correct damage to host compositor
damageHistory.first() is the previous damage region, we need to report the current instead.
This commit is contained in:
parent
e087b2ce2f
commit
1cbf232b98
1 changed files with 2 additions and 2 deletions
|
@ -315,8 +315,8 @@ void EglWaylandBackend::presentOnSurface(EglWaylandOutput *output, const QRegion
|
|||
waylandOutput->surface()->setScale(std::ceil(waylandOutput->scale()));
|
||||
Q_EMIT waylandOutput->outputChange(damage);
|
||||
|
||||
if (supportsSwapBuffersWithDamage() && !output->m_damageHistory.isEmpty()) {
|
||||
QVector<EGLint> rects = regionToRects(output->m_damageHistory.constFirst(), waylandOutput);
|
||||
if (supportsSwapBuffersWithDamage()) {
|
||||
QVector<EGLint> rects = regionToRects(damage, waylandOutput);
|
||||
if (!eglSwapBuffersWithDamageEXT(eglDisplay(), output->m_eglSurface,
|
||||
rects.data(), rects.count() / 4)) {
|
||||
qCCritical(KWIN_WAYLAND_BACKEND, "eglSwapBuffersWithDamage() failed: %x", eglGetError());
|
||||
|
|
Loading…
Reference in a new issue