summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-07-27 16:02:00 +0200
committerMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-08-08 17:24:00 +0200
commit338b42692be66d7812882e13f8c958b719968243 (patch)
treefc28a441c26e8bfdf6eae64c9c1b73285c262ee5 /src
parentc4acee91aff1594901e2a201a6baccc650fad4a8 (diff)
layout: check id_min against lower_bound() result
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
Diffstat (limited to 'src')
-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;