aboutsummaryrefslogtreecommitdiffstats
path: root/src/wm_client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wm_client.cpp')
-rw-r--r--src/wm_client.cpp15
1 files changed, 14 insertions, 1 deletions
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 <json-c/json.h>
#include "wm_client.hpp"
#include "util.hpp"
+#include <ilm/ilm_control.h>
#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)