From 18fc64f881c07de3825d31fcd1b95800d5fddad5 Mon Sep 17 00:00:00 2001
From: patrick96
Date: Sun, 30 Jun 2019 15:32:20 +0200
Subject: [PATCH] monitor: Remove sort in get_monitors
The lambda returns the wrong values and sorting isn't really necessary
---
src/x11/extensions/randr.cpp | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/src/x11/extensions/randr.cpp b/src/x11/extensions/randr.cpp
index 4f49944c..ac4333c1 100644
--- a/src/x11/extensions/randr.cpp
+++ b/src/x11/extensions/randr.cpp
@@ -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;
}