X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=sample%2Fsimple-egl%2Fsrc%2Fsimple-egl.cpp;h=be694d73dfb6869bf27d0aff19a257250c9d4e4c;hb=d22ffadbe9fcb13144264e71da300bdf56724906;hp=f56cf4d8892b32699b1755f92fec778b0eda7960;hpb=58d5aa69c638b5e6d59f858516385e01fe248031;p=src%2Flibhomescreen.git diff --git a/sample/simple-egl/src/simple-egl.cpp b/sample/simple-egl/src/simple-egl.cpp index f56cf4d..be694d7 100644 --- a/sample/simple-egl/src/simple-egl.cpp +++ b/sample/simple-egl/src/simple-egl.cpp @@ -579,11 +579,17 @@ init_hs(LibHomeScreen* hs){ } hs->set_event_handler(LibHomeScreen::Event_TapShortcut, [](json_object *object){ - HMI_DEBUG("simple-egl","try to activesurface %s ", app_name.c_str()); - json_object *obj = json_object_new_object(); - json_object_object_add(obj, wm->kKeyDrawingName, json_object_new_string(app_name.c_str())); - json_object_object_add(obj, wm->kKeyDrawingArea, json_object_new_string("normal.full")); - wm->activateSurface(obj); + const char *application_name = json_object_get_string( + json_object_object_get(object, "application_name")); + HMI_DEBUG("simple-egl","Event_TapShortcut application_name = %s ", application_name); + if(strcmp(application_name, app_name.c_str()) == 0) + { + HMI_DEBUG("simple-egl","try to activesurface %s ", app_name.c_str()); + json_object *obj = json_object_new_object(); + json_object_object_add(obj, wm->kKeyDrawingName, json_object_new_string(app_name.c_str())); + json_object_object_add(obj, wm->kKeyDrawingArea, json_object_new_string("normal.full")); + wm->activateSurface(obj); + } }); return 0;