From a13afdbe2af9815f4b4c2073d30a0ebc40a296b7 Mon Sep 17 00:00:00 2001 From: Kazumasa Mitsunari Date: Fri, 7 Sep 2018 14:09:19 +0900 Subject: addSurface to client Change-Id: I2f09a94893699fc73bc82ac2caad5a9e282405b3 Signed-off-by: Kazumasa Mitsunari --- src/wm_client.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/wm_client.cpp') diff --git a/src/wm_client.cpp b/src/wm_client.cpp index 0f78f9f..500c60e 100644 --- a/src/wm_client.cpp +++ b/src/wm_client.cpp @@ -17,6 +17,7 @@ #include #include "wm_client.hpp" #include "util.hpp" +#include #define INVALID_SURFACE_ID 0 @@ -155,7 +156,7 @@ void WMClient::appendRole(const string& role) * @param unsigned[in] surface * @return true */ -bool WMClient::addSurface(const string &role, unsigned surface) +/* bool WMClient::addSurface(const string &role, unsigned surface) { HMI_DEBUG("Add role %s with surface %d", role.c_str(), surface); if (0 != this->role2surface.count(role)) @@ -164,6 +165,18 @@ bool WMClient::addSurface(const string &role, unsigned surface) } this->role2surface[role] = surface; return true; +} */ + +bool WMClient::addSurface(unsigned surface) +{ + this->surface = surface; + ilmErrorTypes err = ilm_layerAddSurface(this->layer, surface); + + if(err == ILM_SUCCESS) + { + err = ilm_commitChanges(); + } + return (err == ILM_SUCCESS) ? true : false; } bool WMClient::removeSurfaceIfExist(unsigned surface) -- cgit 1.2.3-korg