mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-22 20:09:49 +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},
|
||||
};
|
||||
|
||||
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]);
|
||||
|
|
Loading…
Reference in a new issue