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:46:03 +0900
commitf9e7995b8d6e83236cec630716d5220b0dc81d35 (patch)
treeac6b1db92eab2997dd1e44b6674a9b488b0a67d2
parentdd79396ea1891202e4b4e985c5a078e20c340f72 (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 47f18aa..6bb1a3e 100644
--- a/src/app.cpp
+++ b/src/app.cpp
@@ -746,6 +746,7 @@ void App::emitScreenUpdated(char const* appid) {
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) {
/**
@@ -787,8 +788,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) {
@@ -802,14 +805,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