monitor: Remove sort in get_monitors

The lambda returns the wrong values and sorting isn't really necessary
This commit is contained in:
patrick96 2019-06-30 15:32:20 +02:00 committed by Patrick Ziegler
parent fbbb5922da
commit 18fc64f881

View File

@ -176,16 +176,6 @@ namespace randr_util {
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;
}