mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-03 05:31:59 -07:00
core/surface: fixup a few pointer handling edge cases
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user