summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-06-26 16:40:51 +0200
committerMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-08-08 17:24:00 +0200
commit3187dc90b7d8ee0066e8405f9f0ba93d9793d185 (patch)
tree3409f6b32afe6cbbc2b9a45dc7ed81a21fd29bc3
parent0e2fc19254f9203921f8e2ad7ae338725c21a15e (diff)
wayland: less lookup-y controller_layer()
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
-rw-r--r--src/wayland.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wayland.cpp b/src/wayland.cpp
index 1d53c26..119b19f 100644
--- a/src/wayland.cpp
+++ b/src/wayland.cpp
@@ -229,7 +229,8 @@ void controller::controller_screen(uint32_t id,
void controller::controller_layer(uint32_t id) {
logdebug("genivi::controller @ %p layer %u (%x)", this->proxy, id, id);
- this->layers[id] = std::make_unique<struct layer>(id, this);
+ auto &l = this->layers[id] = std::make_unique<struct layer>(id, this);
+ l->clear_surfaces();
}
void controller::controller_surface(uint32_t id) {