core/surface/buffer: Buffer lock/release fixes (#7110)

This commit is contained in:
Vaxry 2024-07-31 20:47:26 +01:00 committed by GitHub
parent 5489682799
commit 37e1411e8d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 304 additions and 129 deletions

View file

@ -62,12 +62,12 @@ void CXWaylandSurface::ensureListeners() {
});
listeners.commitSurface = surface->events.commit.registerListener([this](std::any d) {
if (surface->pending.buffer && !mapped) {
if (surface->pending.texture && !mapped) {
map();
return;
}
if (!surface->pending.buffer && mapped) {
if (!surface->pending.texture && mapped) {
unmap();
return;
}
@ -131,7 +131,7 @@ void CXWaylandSurface::considerMap() {
return;
}
if (surface->pending.buffer) {
if (surface->pending.texture) {
Debug::log(LOG, "XWayland surface: considerMap, sure, we have a buffer");
map();
return;