mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 18:46:00 +01:00
layersurface: dont rollover on size_t (#7451)
unneded rollover on size_t if force equals -1
This commit is contained in:
parent
8162fae377
commit
cae937c51b
1 changed files with 2 additions and 2 deletions
|
@ -432,8 +432,8 @@ void CLayerSurface::startAnimation(bool in, bool instant) {
|
||||||
PMONITOR->vecPosition + Vector2D{PMONITOR->vecSize.x, PMONITOR->vecSize.y / 2},
|
PMONITOR->vecPosition + Vector2D{PMONITOR->vecSize.x, PMONITOR->vecSize.y / 2},
|
||||||
};
|
};
|
||||||
|
|
||||||
float closest = std::numeric_limits<float>::max();
|
float closest = std::numeric_limits<float>::max();
|
||||||
size_t leader = force;
|
int leader = force;
|
||||||
if (leader == -1) {
|
if (leader == -1) {
|
||||||
for (size_t i = 0; i < 4; ++i) {
|
for (size_t i = 0; i < 4; ++i) {
|
||||||
float dist = MIDDLE.distance(edgePoints[i]);
|
float dist = MIDDLE.distance(edgePoints[i]);
|
||||||
|
|
Loading…
Reference in a new issue