Code Review
/
apps
/
agl-service-windowmanager.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge branch 'sandbox/knimitz/format_code' into sandbox/knimitz/lock
[apps/agl-service-windowmanager.git]
/
src
/
applist.cpp
diff --git
a/src/applist.cpp
b/src/applist.cpp
index
2575849
..
9b06c84
100644
(file)
--- a/
src/applist.cpp
+++ b/
src/applist.cpp
@@
-122,11
+122,6
@@
unsigned AppList::addAllocateRequest(WMRequest req)
return req.req_num; // return 1; if you test time_expire
}
return req.req_num; // return 1; if you test time_expire
}
-bool AppList::requestFinished() const
-{
- return this->req_list.empty();
-}
-
struct WMTrigger AppList::getRequest(unsigned req_num)
{
for (const auto &x : this->req_list)
struct WMTrigger AppList::getRequest(unsigned req_num)
{
for (const auto &x : this->req_list)
@@
-149,9
+144,9
@@
const vector<struct WMAction> &AppList::getActions(unsigned req_num)
}
}
}
}
-
bool
AppList::setAction(unsigned req_num, const struct WMAction &action)
+
WMError
AppList::setAction(unsigned req_num, const struct WMAction &action)
{
{
-
bool result = false
;
+
WMError result = WMError::FAIL
;
for (auto &x : this->req_list)
{
if (req_num != x.req_num)
for (auto &x : this->req_list)
{
if (req_num != x.req_num)
@@
-159,7
+154,7
@@
bool AppList::setAction(unsigned req_num, const struct WMAction &action)
continue;
}
x.sync_draw_req.push_back(action);
continue;
}
x.sync_draw_req.push_back(action);
- result =
true
;
+ result =
WMError::SUCCESS
;
break;
}
break;
}
@@
-173,9
+168,9
@@
bool AppList::setAction(unsigned req_num, const struct WMAction &action)
* 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.
*/
* 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.
*/
-
bool
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, bool visible)
{
{
-
bool result = false
;
+
WMError result = WMError::NOT_REGISTERED
;
for (auto &x : req_list)
{
if (req_num != x.req_num)
for (auto &x : req_list)
{
if (req_num != x.req_num)
@@
-186,7
+181,7
@@
bool AppList::setAction(unsigned req_num, const string &appid, const string &rol
WMAction action{appid, role, area, visible, edraw_f};
x.sync_draw_req.push_back(action);
WMAction action{appid, role, area, visible, edraw_f};
x.sync_draw_req.push_back(action);
- result =
true
;
+ result =
WMError::SUCCESS
;
break;
}
return result;
break;
}
return result;