aboutsummaryrefslogtreecommitdiffstats
path: root/src/window_manager.cpp
diff options
context:
space:
mode:
authorKazumasa Mitsunari <knimitz@witz-inc.co.jp>2019-02-04 17:30:56 +0900
committerKazumasa Mitsunari <knimitz@witz-inc.co.jp>2019-03-22 15:35:49 +0900
commit8c455d3019d238494dbae5b5ec876e24ee5d616e (patch)
tree3449cc222c702caa9606341258fd709b16bf8d04 /src/window_manager.cpp
parent1808ab2892ead7aac9227033278bd82ba5a6eae0 (diff)
Change active/inactive state spec
"active" state means "visible" on source code currently. Specification in HMI-FW spec 0.9.2 says it's not visible. https://wiki.automotivelinux.org/hmiframework It's the right to have resources such as buffers(surface). But from the view point of implementation of windowmanager-service, it is difficult to control resources of application. So this patch fixes just adding the methods to change the state of client. v2. emit active/inactive when state is changed. Change-Id: If445af3cdf724827ccf28f40af28cca4a2ffcbc1 Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
Diffstat (limited to 'src/window_manager.cpp')
-rw-r--r--src/window_manager.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/window_manager.cpp b/src/window_manager.cpp
index abd4552..c7b6741 100644
--- a/src/window_manager.cpp
+++ b/src/window_manager.cpp
@@ -265,10 +265,11 @@ void WindowManager::api_activate_window(char const *appid, char const *drawing_n
if(!g_app_list.contains(id))
{
- reply("app doesn't request 'requestSurface' or 'setRole' yet");
+ reply("app doesn't request 'requestSurface' yet");
return;
}
auto client = g_app_list.lookUpClient(id);
+ client->activate();
Task task = Task::TASK_ALLOCATE;
unsigned req_num = 0;
@@ -306,8 +307,15 @@ void WindowManager::api_activate_window(char const *appid, char const *drawing_n
void WindowManager::api_deactivate_window(char const *appid, char const *drawing_name,
const reply_func &reply)
{
- // Check Phase
string id = appid;
+ if(!g_app_list.contains(id))
+ {
+ reply("app doesn't request 'requestSurface' yet");
+ return;
+ }
+ auto client = g_app_list.lookUpClient(id);
+ client->deactivate();
+ // Check Phase
string role = drawing_name;
string area = ""; //drawing_area;
Task task = Task::TASK_RELEASE;
@@ -804,7 +812,6 @@ WMError WindowManager::startTransition(unsigned req_num)
for (const auto &x : actions)
{
this->lc->visibilityChange(x);
- x.client->emitActive(false);
x.client->emitVisible(false);
}
this->lc->renderLayers();
@@ -841,8 +848,6 @@ WMError WindowManager::doEndDraw(unsigned req_num)
return ret;
}
ret = this->lc->visibilityChange(act);
-
- act.client->emitActive((act.visible == VISIBLE));
act.client->emitVisible((act.visible == VISIBLE));
if (ret != WMError::SUCCESS)