aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuta Doi <yuta-d@witz-inc.co.jp>2018-06-01 18:44:35 +0900
committerYuta Doi <yuta-d@witz-inc.co.jp>2018-06-01 18:44:35 +0900
commitdaebef23d579cd9826731bc6c7fcfba74e24531d (patch)
treede3a373d112b91e4946b4e96960f61b76a9266ef
parent3b69381963b84103ade385727029bf7164f93ec3 (diff)
Modify request_surface for XDG app
Change-Id: I91ac5d09f985e2dda1b0ed6274f01106c87807be Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
-rw-r--r--src/app.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/app.cpp b/src/app.cpp
index bbb14c0..be4782a 100644
--- a/src/app.cpp
+++ b/src/app.cpp
@@ -727,6 +727,7 @@ void App::emitCarRun() {
result<int> App::api_request_surface(char const *drawing_name) {
// Convert drawing_name to role
const char* role = this->convertDrawingNameToRole(drawing_name);
+
auto lid = this->layers.get_layer_id(std::string(role));
if (!lid) {
/**
@@ -768,8 +769,10 @@ result<int> App::api_request_surface(char const *drawing_name) {
char const *App::api_request_surface(char const *drawing_name,
char const *ivi_id) {
ST();
+ // Convert drawing_name to role
+ const char* role = this->convertDrawingNameToRole(drawing_name);
- auto lid = this->layers.get_layer_id(std::string(drawing_name));
+ auto lid = this->layers.get_layer_id(std::string(role));
unsigned sid = std::stol(ivi_id);
if (!lid) {
@@ -783,14 +786,14 @@ char const *App::api_request_surface(char const *drawing_name,
}
}
- auto rname = this->lookup_id(drawing_name);
+ auto rname = this->lookup_id(role);
if (rname) {
return "Surface already present";
}
// register pair drawing_name and ivi_id
- this->id_alloc.register_name_id(drawing_name, sid);
+ this->id_alloc.register_name_id(role, sid);
this->layers.add_surface(sid, *lid);
// this surface is already created