aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzheng_wenlong <wenlong_zheng@nexty-ele.com>2019-06-14 15:10:05 +0900
committerzheng_wenlong <wenlong_zheng@nexty-ele.com>2019-06-14 15:10:05 +0900
commitba31b60e0e93d8827a5721875544704c5ae2ebbf (patch)
tree7648cb83e2169531bbd73b0480ac53c4c211a6c2
parenta1bead0f75692fa187c595d70529dd7ec292e4f3 (diff)
add area informationsandbox/zheng_wenlong/als2019
-rw-r--r--src/aglextras/hmi/aglwmclient.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/aglextras/hmi/aglwmclient.cpp b/src/aglextras/hmi/aglwmclient.cpp
index 209ae5c..b7a40a6 100644
--- a/src/aglextras/hmi/aglwmclient.cpp
+++ b/src/aglextras/hmi/aglwmclient.cpp
@@ -164,9 +164,18 @@ AGLWmClient::AGLWmClient (const QString&, int port, QString)
h_ptr->set_event_handler (
LibHomeScreen::Event_ShowWindow,
[this](json_object* object) {
- qDebug("Surface got showWindow\n");
- activate_window();
+ 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)) {
+ qDebug("Surface %s got showWindow, area: %s. \n", d_ptr->layout.toStdString().c_str(), json_object_get_string(obj_area));
+ w_ptr->activateWindow(d_ptr->layout.toStdString().c_str(), json_object_get_string(obj_area));
+ }
+ else {
+ qDebug("Surface %s got showWindow.\n", d_ptr->layout.toStdString().c_str());
+ w_ptr->activateWindow(d_ptr->layout.toStdString().c_str(), "normal.full");
+ }
}
+
);
#endif // USE_AGL_HMI_LOWLEVEL_API
}