pid_t surf_pid = surf_props.creatorPid;
if (!created) {
- AGL_DEBUG("ivi surface (id=%d, pid=%d) destroyed.", id, surf_pid);
+ AGL_DEBUG("ivi surface (id=%d, pid=%d)surf_pid destroyed.", id, surf_pid);
m_launcher->unregister_surfpid(surf_pid);
m_surfaces.erase(surf_pid);
return;
std::function< void(json_object*) > handler = [this] (json_object* object) {
json_object *val;
-
+
if (json_object_object_get_ex(object, "application_name", &val)) {
const char *name = json_object_get_string(val);
AGL_DEBUG("Event_TapShortcut <%s>", name);
-
- if (strcmp(name, this->m_role.c_str()) == 0) {
- // check app exist and re-launch if needed
- AGL_DEBUG("Activesurface %s ", this->m_role.c_str());
-
- json_object *obj = json_object_new_object();
- json_object_object_add(obj, this->m_wm->kKeyDrawingName,
- json_object_new_string(this->m_role.c_str()));
- json_object_object_add(obj, this->m_wm->kKeyDrawingArea,
- json_object_new_string("normal.full"));
-
- this->m_wm->activateSurface(obj);
- }
+
+ json_object *para, *area;
+ json_object_object_get_ex(object, "parameter", ¶);
+ json_object_object_get_ex(para, "area", &area);
+ const char *displayArea = json_object_get_string(area);
+ AGL_DEBUG("display area=%s",displayArea);
+
+ json_object *obj = json_object_new_object();
+ json_object_object_add(obj, this->m_wm->kKeyDrawingName,
+ json_object_new_string(this->m_role.c_str()));
+ json_object_object_add(obj, this->m_wm->kKeyDrawingArea,
+ json_object_new_string(displayArea));
+ this->m_wm->activateWindow(obj);
+
}
};
m_hs->set_event_handler(LibHomeScreen::Event_TapShortcut, handler);
m_id = std::string(id);
m_port = port;
m_token = std::string(token);
+ is_first = true;
auto path = std::string(getenv("AFM_APP_INSTALL_DIR"));
// Setup ilmController API
m_ic = new ILMControl(notify_ivi_control_cb_static, this);
-
AGL_DEBUG("RunXDG created.");
}
// the application has not been run yet (1st time launch)
m_pending_create = false;
+ AGL_DEBUG("requestSurface(%s,%s)", m_role.c_str(), sid.c_str());
json_object *obj = json_object_new_object();
json_object_object_add(obj, m_wm->kKeyDrawingName,
json_object_new_string(m_role.c_str()));
json_object_object_add(obj, m_wm->kKeyDrawingArea,
json_object_new_string("normal.full"));
- m_wm->activateSurface(obj);
+ m_wm->activateWindow(obj);
}
}
pid_t POSIXLauncher::find_surfpid_by_rid (pid_t rid)
{
- AGL_DEBUG("find surfpid by rid(%d)", rid);
if (std::count(m_pid_v.begin(), m_pid_v.end(), rid)) {
AGL_DEBUG("found return(%d)", rid);
return rid;
// in case, target app has already run
if (m_launcher->m_rid) {
+ AGL_DEBUG("RunXDG::start");
pid_t surf_pid = m_launcher->find_surfpid_by_rid(m_launcher->m_rid);
+ AGL_DEBUG("surf_pid--=%d",surf_pid);
if (surf_pid > 0) {
AGL_DEBUG("match: surf:pid=%d, afm:rid=%d", surf_pid,
m_launcher->m_rid);