From 36d0048ad8c3b52f315d266b3adf4b021d43a40f Mon Sep 17 00:00:00 2001 From: Tom Englund Date: Wed, 21 Aug 2024 12:49:53 +0200 Subject: [PATCH] layersurface: dont rollover on size_t unneded rollover on size_t if force equals -1 --- src/desktop/LayerSurface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/desktop/LayerSurface.cpp b/src/desktop/LayerSurface.cpp index c352fa7411f..8fd448efa69 100644 --- a/src/desktop/LayerSurface.cpp +++ b/src/desktop/LayerSurface.cpp @@ -432,8 +432,8 @@ void CLayerSurface::startAnimation(bool in, bool instant) { PMONITOR->vecPosition + Vector2D{PMONITOR->vecSize.x, PMONITOR->vecSize.y / 2}, }; - float closest = std::numeric_limits::max(); - size_t leader = force; + float closest = std::numeric_limits::max(); + int leader = force; if (leader == -1) { for (size_t i = 0; i < 4; ++i) { float dist = MIDDLE.distance(edgePoints[i]);