monitor: Remove sort in get_monitors
The lambda returns the wrong values and sorting isn't really necessary
This commit is contained in:
parent
fbbb5922da
commit
18fc64f881
@ -176,16 +176,6 @@ namespace randr_util {
|
|||||||
monitors.end());
|
monitors.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
sort(monitors.begin(), monitors.end(), [](monitor_t& m1, monitor_t& m2) -> bool {
|
|
||||||
if (m1->x < m2->x || m1->y + m1->h <= m2->y) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (m1->x > m2->x || m1->y + m1->h > m2->y) {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
return monitors;
|
return monitors;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user