From 516f8db80ee3c9d935c9f42468d9bdd6a05b67de Mon Sep 17 00:00:00 2001 From: Kazumasa Mitsunari Date: Sat, 8 Sep 2018 15:33:48 +0900 Subject: Return WMError instead of bool Signed-off-by: Kazumasa Mitsunari --- src/wm_client.cpp | 4 ++-- src/wm_client.hpp | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/wm_client.cpp b/src/wm_client.cpp index 500c60e..baed828 100644 --- a/src/wm_client.cpp +++ b/src/wm_client.cpp @@ -167,7 +167,7 @@ void WMClient::appendRole(const string& role) return true; } */ -bool WMClient::addSurface(unsigned surface) +WMError WMClient::addSurface(unsigned surface) { this->surface = surface; ilmErrorTypes err = ilm_layerAddSurface(this->layer, surface); @@ -176,7 +176,7 @@ bool WMClient::addSurface(unsigned surface) { err = ilm_commitChanges(); } - return (err == ILM_SUCCESS) ? true : false; + return (err == ILM_SUCCESS) ? WMError::SUCCESS : WMError::FAIL; } bool WMClient::removeSurfaceIfExist(unsigned surface) diff --git a/src/wm_client.hpp b/src/wm_client.hpp index 7c6c0b4..5342b76 100644 --- a/src/wm_client.hpp +++ b/src/wm_client.hpp @@ -20,6 +20,7 @@ #include #include #include +#include "wm_error.hpp" extern "C" { @@ -58,7 +59,7 @@ class WMClient void setRole(const std::string& role); void appendRole(const std::string& role); //bool addSurface(const std::string& role, unsigned surface); - bool addSurface(unsigned surface); + WMError addSurface(unsigned surface); bool removeSurfaceIfExist(unsigned surface); bool removeRole(const std::string& role); -- cgit 1.2.3-korg