diff options
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/src/main.cpp b/src/main.cpp index 07baf2a..52a2ed4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -304,13 +304,8 @@ void windowmanager_activatesurface(afb_req req) noexcept { return; } - const char* a_role = afb_req_value(req, "role"); - if(!a_role){ - a_role = ""; - } - - g_afb_instance->app.allocateWindowResource("activate", a_drawing_name, - a_drawing_area, a_role, + g_afb_instance->app.allocateWindowResource("activate", + a_drawing_name, a_drawing_area, [&req](const char* errmsg){ if (errmsg != nullptr) { HMI_ERROR("wm", errmsg); @@ -344,13 +339,8 @@ void windowmanager_deactivatesurface(afb_req req) noexcept { return; } - const char* a_role = afb_req_value(req, "role"); - if(!a_role){ - a_role = ""; - } - - g_afb_instance->app.allocateWindowResource("deactivate", a_drawing_name, - nullptr, a_role, + g_afb_instance->app.allocateWindowResource("deactivate", + a_drawing_name, nullptr, [&req](const char* errmsg){ if (errmsg != nullptr) { HMI_ERROR("wm", errmsg); @@ -759,7 +749,7 @@ void on_event(const char *event, struct json_object *object){ // Allocate window resource if (nullptr != can_event) { - g_afb_instance->app.allocateWindowResource(can_event, nullptr, + g_afb_instance->app.allocateWindowResource(can_event, nullptr, nullptr, [](const char* errmsg){ if (errmsg != nullptr) { |