summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-06-26 16:41:15 +0200
committerMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-08-08 17:24:00 +0200
commit5aa433d98ea286bed658cc71998b581bf3fbc752 (patch)
treed7b7970bfdb7113f2aa9f25316a2ade77da37775 /src
parent3187dc90b7d8ee0066e8405f9f0ba93d9793d185 (diff)
wayland: controller_surface() sets surface visibility, less lookups
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
Diffstat (limited to 'src')
-rw-r--r--src/wayland.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wayland.cpp b/src/wayland.cpp
index 119b19f..16e2361 100644
--- a/src/wayland.cpp
+++ b/src/wayland.cpp
@@ -238,9 +238,9 @@ void controller::controller_surface(uint32_t id) {
this->surfaces[id] = std::make_unique<struct surface>(id, this);
add_task("fullscreen surface", [id](struct controller *c) {
- c->surfaces[id]->set_destination_rectangle(0, 0, c->output_size.w,
- c->output_size.h);
- c->surfaces[id]->set_visibility(1);
+ auto &s = c->surfaces[id];
+ s->set_destination_rectangle(0, 0, c->output_size.w, c->output_size.h);
+ s->set_visibility(1);
uint32_t lid = id == 0x16180 ? 1000 : 100;
c->layers[lid]->add_surface(s.get());
logdebug("Surface %u now fullscreen on layer %u", id, lid);