From ba31b60e0e93d8827a5721875544704c5ae2ebbf Mon Sep 17 00:00:00 2001 From: zheng_wenlong Date: Fri, 14 Jun 2019 15:10:05 +0900 Subject: add area information --- src/aglextras/hmi/aglwmclient.cpp | 13 +++++++++++-- 1 file 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 } -- cgit 1.2.3-korg