aboutsummaryrefslogtreecommitdiffstats
path: root/src/applist.cpp
diff options
context:
space:
mode:
authorKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-06-18 09:16:23 +0900
committerKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-06-18 09:24:15 +0900
commit494fe928438bd08f6a5794a2a77119d5fa9dcdd2 (patch)
treeb501a193e3846f3c0932eeb2f9e33bc6ed148c78 /src/applist.cpp
parent5ae7f0df360a72a42b4722cbffddd169da21b4d0 (diff)
Use instead enum of bool visible
To improve readability, use enum TaskVisible instead of visible Change-Id: I40f15635a62177443e32725fe90a4d6d3f253f8a Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
Diffstat (limited to 'src/applist.cpp')
-rw-r--r--src/applist.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/applist.cpp b/src/applist.cpp
index 130eb61..d3a839c 100644
--- a/src/applist.cpp
+++ b/src/applist.cpp
@@ -343,14 +343,14 @@ WMError AppList::setAction(unsigned req_num, const struct WMAction &action)
* @param string[in] application id
* @param string[in] role
* @param string[in] area
- * @param bool[in] the role should be visible or not.
+ * @param Task[in] the role should be visible or not.
* @return WMError If request number is not valid, FAIL will be returned.
* @attention This function set action with parameters, then caller doesn't need to create WMAction object.
* If visible is true, it means app should be visible, so enddraw_finished parameter will be false.
* otherwise (visible is false) app should be invisible. Then enddraw_finished param is set to true.
* This function doesn't support actions for focus yet.
*/
-WMError AppList::setAction(unsigned req_num, const string &appid, const string &role, const string &area, bool visible)
+WMError AppList::setAction(unsigned req_num, const string &appid, const string &role, const string &area, TaskVisible visible)
{
std::lock_guard<std::mutex> lock(this->mtx);
WMError result = WMError::FAIL;
@@ -360,7 +360,8 @@ WMError AppList::setAction(unsigned req_num, const string &appid, const string &
{
continue;
}
- bool edraw_f = (visible) ? false : true;
+ // If visible task is not invisible, redraw is required -> true
+ bool edraw_f = (visible != TaskVisible::INVISIBLE) ? false : true;
WMAction action{appid, role, area, visible, edraw_f};
x.sync_draw_req.push_back(action);