mirror of
https://github.com/youwen5/nixos.git
synced 2024-11-25 02:03:51 -08:00
29 lines
1 KiB
Diff
29 lines
1 KiB
Diff
|
From cae937c51bd220d6676c6027d05ea51fc3c821bb Mon Sep 17 00:00:00 2001
|
||
|
From: Tom Englund <tomenglund26@gmail.com>
|
||
|
Date: Wed, 21 Aug 2024 23:05:03 +0200
|
||
|
Subject: [PATCH 20/20] layersurface: dont rollover on size_t (#7451)
|
||
|
|
||
|
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 c352fa74..8fd448ef 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<float>::max();
|
||
|
- size_t leader = force;
|
||
|
+ float closest = std::numeric_limits<float>::max();
|
||
|
+ int leader = force;
|
||
|
if (leader == -1) {
|
||
|
for (size_t i = 0; i < 4; ++i) {
|
||
|
float dist = MIDDLE.distance(edgePoints[i]);
|
||
|
--
|
||
|
2.45.2
|
||
|
|