+ x.sync_draw_req.push_back(action);
+ result = WMError::SUCCESS;
+ break;
+ }
+ return result;
+}
+
+/**
+ * Note:
+ * @note This function set action with parameters.
+ * If visible is true, it means app should be visible, so enddraw_finished parameter should 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.
+ */
+/**
+ * Set actions to the request.
+ *
+ * This function is overload function.
+ * The feature is same as other one.
+ *
+ * @param unsigned[in] request number
+ * @param string[in] application id
+ * @param string[in] role
+ * @param string[in] area
+ * @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, TaskVisible visible)
+{
+ std::lock_guard<std::mutex> lock(this->mtx);
+ WMError result = WMError::FAIL;
+ for (auto &x : req_list)
+ {
+ if (req_num != x.req_num)
+ {
+ continue;
+ }
+ // 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};