aboutsummaryrefslogtreecommitdiffstats
path: root/src/wm_layer.cpp
diff options
context:
space:
mode:
authorKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-09-11 20:02:44 +0900
committerKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-09-11 20:02:44 +0900
commit8924f98567dade55adffce245766ffd22c096cbc (patch)
tree5b64b8e87644d2993b2349df8c1064c851acb252 /src/wm_layer.cpp
parent92cbe39df7b53208e15bea19e523570be915cf1e (diff)
Fix double adding to render_order
Change-Id: I47a10f70b3e07b0bdb1339bf171c76cc8780c8e6 Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
Diffstat (limited to 'src/wm_layer.cpp')
-rw-r--r--src/wm_layer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wm_layer.cpp b/src/wm_layer.cpp
index b3e3d2c..98aebeb 100644
--- a/src/wm_layer.cpp
+++ b/src/wm_layer.cpp
@@ -63,7 +63,9 @@ const vector<unsigned> LayerState::getIviIdList()
void LayerState::addLayer(unsigned layer)
{
- this->render_order.push_back(layer);
+ auto result = std::find(this->render_order.begin(), this->render_order.end(), layer);
+ if(result == this->render_order.end())
+ this->render_order.push_back(layer);
}
void LayerState::removeLayer(unsigned layer)