diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-07-29 19:02:58 +0200 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2024-07-29 19:29:08 +0200 |
| commit | e67322034037fef22079c8e480be38c1d04b5a4a (patch) | |
| tree | 40778b615ecb56680825ba3e268081dae4e3f854 /src/managers/PointerManager.cpp | |
| parent | 9c38b0fdbe32dc2cb81d53c9be90113d114f1cd2 (diff) | |
core/surface: fixup a few pointer handling edge cases
Diffstat (limited to 'src/managers/PointerManager.cpp')
| -rw-r--r-- | src/managers/PointerManager.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/managers/PointerManager.cpp b/src/managers/PointerManager.cpp index a09992a2..a405e2eb 100644 --- a/src/managers/PointerManager.cpp +++ b/src/managers/PointerManager.cpp @@ -151,6 +151,8 @@ void CPointerManager::setCursorSurface(SP<CWLSurface> surf, const Vector2D& hots currentCursorImage.surface = surf; currentCursorImage.scale = surf->resource()->current.scale; + surf->resource()->map(); + currentCursorImage.destroySurface = surf->events.destroy.registerListener([this](std::any data) { resetCursorImage(); }); currentCursorImage.commitSurface = surf->resource()->events.commit.registerListener([this](std::any data) { damageIfSoftware(); @@ -222,6 +224,8 @@ void CPointerManager::resetCursorImage(bool apply) { currentCursorImage.surface->resource()->leave(m); } + currentCursorImage.surface->resource()->unmap(); + currentCursorImage.destroySurface.reset(); currentCursorImage.commitSurface.reset(); currentCursorImage.surface.reset(); |
