summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/layout.hpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/layout.hpp b/src/layout.hpp
index 6c60bde..3308cf6 100644
--- a/src/layout.hpp
+++ b/src/layout.hpp
@@ -62,7 +62,9 @@ struct surface_id_to_layer_map {
std::cend(this->mapping), surface_id);
if (i != this->mapping.end()) {
- return std::experimental::optional<int>(i->layer_id);
+ if (i->id_min <= surface_id) {
+ return std::experimental::optional<int>(i->layer_id);
+ }
}
return std::experimental::nullopt;