diff options
author | 2018-11-30 16:01:33 +0900 | |
---|---|---|
committer | 2018-11-30 16:01:33 +0900 | |
commit | f77608d1ee6464009f49cd30d946f149571acbc3 (patch) | |
tree | 7f208c1cf46711447212227a93c0e732e436b22a | |
parent | 94db06ff082d2b5e1ad99ed52c844dcec0d070ca (diff) |
use area infor
-rw-r--r-- | app/src/main.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/src/main.cpp b/app/src/main.cpp index 6dc6822..c9b8172 100644 --- a/app/src/main.cpp +++ b/app/src/main.cpp @@ -122,7 +122,14 @@ int main(int argc, char* argv[]) { homescreenHandler->set_event_handler( QLibHomeScreen::Event_TapShortcut, [qwm, role](json_object* object) { qDebug("Surface warehouse got tapShortcut.\n"); - qwm->activateWindow(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.toStdString().c_str(), json_object_get_string(obj_area)); + } + else { + qwm->activateWindow(role.toStdString().c_str(), "normal"); + } }); context->setContextProperty(QStringLiteral("homescreenHandler"), |