summaryrefslogtreecommitdiffstats
path: root/src/wm_client.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/wm_client.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/wm_client.cpp')
-rw-r--r--src/wm_client.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/wm_client.cpp b/src/wm_client.cpp
index ff08a00..d3f0364 100644
--- a/src/wm_client.cpp
+++ b/src/wm_client.cpp
@@ -72,6 +72,8 @@ WMClient::WMClient(const string &appid, const string &role)
: id(appid),
layer(0),
is_source_set(false),
+ is_active(false),
+ main_role(role),
role2surface(0),
evname2afb_event(0)
{
@@ -90,6 +92,8 @@ WMClient::WMClient(const string &appid, const string &role)
WMClient::WMClient(const string &appid, unsigned layer, const string &role)
: id(appid),
layer(layer),
+ is_source_set(false),
+ is_active(false),
main_role(role),
role2surface(0),
evname2afb_event(0)
@@ -131,6 +135,20 @@ void WMClient::registerSurface(unsigned surface)
this->surface = surface;
}
+void WMClient::activate()
+{
+ if(!this->isActive())
+ this->emitActive(true); // emit when state is changed
+ this->is_active = true;
+}
+
+void WMClient::deactivate()
+{
+ if(this->isActive())
+ this->emitActive(false); // emit when state is changed
+ this->is_active = false;
+}
+
/**
* Add surface to the client
*