diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-07-21 22:05:53 +0200 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2024-07-21 22:05:53 +0200 |
| commit | 341fb4497fc6b5e6097361c2820a4cd4d1c6ccab (patch) | |
| tree | c9e3dc756787b628e7dbcd1416132c154b3535d8 /src/protocols/core/Compositor.cpp | |
| parent | cbaac6deafb857662d630efbca8b0ebac0f11b44 (diff) | |
wayland/compositor: fixup buffer damage tracking for wl_shm buffers
remove qt hack, fixup conditions
fixes #6844
Diffstat (limited to 'src/protocols/core/Compositor.cpp')
| -rw-r--r-- | src/protocols/core/Compositor.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/protocols/core/Compositor.cpp b/src/protocols/core/Compositor.cpp index d11ba40c..12647811 100644 --- a/src/protocols/core/Compositor.cpp +++ b/src/protocols/core/Compositor.cpp @@ -84,7 +84,7 @@ CWLSurfaceResource::CWLSurfaceResource(SP<CWlSurface> resource_) : resource(reso Vector2D oldBufSize = current.buffer ? current.buffer->size : Vector2D{}; Vector2D newBufSize = pending.buffer ? pending.buffer->size : Vector2D{}; - if (oldBufSize != newBufSize) + if (oldBufSize != newBufSize || current.buffer != pending.buffer) pending.bufferDamage = CBox{{}, {INT32_MAX, INT32_MAX}}; bufferReleased = false; @@ -407,10 +407,7 @@ void CWLSurfaceResource::commitPendingState() { pending.bufferDamage.clear(); if (current.buffer && !bufferReleased) { - // without previous dolphin et al are weird vvv - //CRegion surfaceDamage = - // current.damage.copy().scale(current.scale).transform(current.transform, current.size.x, current.size.y).add(current.bufferDamage).add(previousBufferDamage); - current.buffer->update(CBox{{}, {INT32_MAX, INT32_MAX}}); // FIXME: figure this out to not use this hack. QT apps are wonky without this. + current.buffer->update(accumulateCurrentBufferDamage()); // release the buffer if it's synchronous as update() has done everything thats needed // so we can let the app know we're done. |
