aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-07-16 16:38:43 +0900
committerKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-07-16 16:38:43 +0900
commitec78c651f425206c46b543786af0793033a41640 (patch)
tree08d0d810e85523159e31a894b54739e1626b6bc3
parent1a44755fd7406f80d1e2feb432e740ec45bae9cd (diff)
Forgot to add code of set_role_pid_ver
Change-Id: I94b9c290abdd5a531ef0f7956b4e79d1e76409d7 Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
-rw-r--r--src/window_manager.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/window_manager.cpp b/src/window_manager.cpp
index 1cee825..17be0f6 100644
--- a/src/window_manager.cpp
+++ b/src/window_manager.cpp
@@ -445,10 +445,26 @@ void WindowManager::api_activate_surface(char const *appid, char const *drawing_
// TODO: application requests by old role,
// so convert role old to new
const char *c_role = this->convertRoleOldToNew(drawing_name);
-
std::string id = appid;
std::string role = c_role;
std::string area = drawing_area;
+
+ if(!g_app_list.contains(id))
+ {
+ reply("app doesn't request 'requestSurface' or 'setRole' yet");
+ return;
+ }
+ auto client = g_app_list.lookUpClient(id);
+
+ unsigned srfc = client->surfaceID(role);
+ if(srfc == 0)
+ {
+ HMI_ERROR("wm", "role sould be set with surface");
+ reply("role sould be set with surface");
+ return;
+ }
+ g_app_list.removeFloatingSurface(client->surfaceID(role));
+
Task task = Task::TASK_ALLOCATE;
unsigned req_num = 0;
WMError ret = WMError::UNKNOWN;