- WMAction action{appid, role, area, false};
+ x.sync_draw_req.push_back(action);
+ result = WMError::SUCCESS;
+ break;
+ }
+
+ return result;
+}
+
+/**
+ * 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.
+ */
+WMError AppList::setAction(unsigned req_num, const string &appid, const string &role, const string &area, bool visible)
+{
+ WMError result = WMError::NOT_REGISTERED;
+ for (auto &x : req_list)
+ {
+ if (req_num != x.req_num)
+ {
+ continue;
+ }
+ bool edraw_f = (visible) ? false : true;
+ WMAction action{appid, role, area, visible, edraw_f};