X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fwm_layer.cpp;h=4eceb4337fc02547c6560e5f6ef1d50f493424af;hb=refs%2Ftags%2Ficefish%2F8.99.2;hp=294e356b462c6084767fdbe4d56431ea7d97c7fd;hpb=010ca3f3459a52e44deb5e70e94e9cd394814e3e;p=apps%2Fagl-service-windowmanager.git diff --git a/src/wm_layer.cpp b/src/wm_layer.cpp index 294e356..4eceb43 100644 --- a/src/wm_layer.cpp +++ b/src/wm_layer.cpp @@ -36,6 +36,11 @@ LayerState::LayerState() area2appid() {} +const unordered_map LayerState::getCurrentState() +{ + return this->area2appid; +} + const vector LayerState::getIviIdList() { return this->render_order; @@ -183,6 +188,18 @@ void WMLayer::attachAppToArea(const string& app, const string& area) this->tmp_state.attachAppToArea(app, area); } +string WMLayer::attachedApp(const string& area) +{ + string ret; + auto list = this->state.getCurrentState(); + auto app = list.find(area); + if(app != list.end()) + { + ret = app->second; + } + return ret; +} + void WMLayer::appendArea(const string& area) { this->area_list.push_back(area); @@ -234,8 +251,10 @@ void WMLayer::dump() { DUMP("===== wm layer status ====="); DUMP("Layer :%s", this->name.c_str()); - this->tmp_state.dump(); + DUMP(" [Current]"); this->state.dump(); + DUMP(" [To be]"); + this->tmp_state.dump(); DUMP("===== wm layer status end ====="); }