From ae68306fd69e4360e2b96333d0ec34a08d50400d Mon Sep 17 00:00:00 2001 From: zheng_wenlong Date: Fri, 30 Nov 2018 16:16:17 +0900 Subject: use area info --- app/main.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/main.cpp b/app/main.cpp index 8227411..aff9999 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -112,7 +112,14 @@ int main(int argc, char* argv[]) { hs->set_event_handler( LibHomeScreen::Event_TapShortcut, [qwm, role](json_object* object) { qDebug("Surface Video got tapShortcut\n"); - qwm->activateSurface(role); + struct json_object *obj_param = nullptr, *obj_area = nullptr; + if(json_object_object_get_ex(object, "parameter", &obj_param) + && json_object_object_get_ex(obj_param, "area", &obj_area)) { + qwm->activateWindow(role, json_object_get_string(obj_area)); + } + else { + qwm->activateWindow(role, "normal"); + } }); // Set the event handler for Event_Restriction which will allocate or -- cgit 1.2.3-korg