X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=sample%2Fapp%2Feventhandler.cpp;fp=sample%2Fapp%2Feventhandler.cpp;h=b4b6a03c86edc032a5d6d4b0635e7c5b1267917f;hb=e22bd28a5e1d11a8b608bd2a11b935ad5bcfc9b2;hp=3a618871b02de3cd96aafdabab90187acaaed97f;hpb=3007e9ca8e0636e6a2a4e61eb113869bfcc1385b;p=apps%2Fonscreenapp.git diff --git a/sample/app/eventhandler.cpp b/sample/app/eventhandler.cpp index 3a61887..b4b6a03 100644 --- a/sample/app/eventhandler.cpp +++ b/sample/app/eventhandler.cpp @@ -74,13 +74,24 @@ application_id_event(void *data, struct agl_shell_desktop *agl_shell_desktop, return; qInfo() << "app_id: " << app_id; +} - if (strcmp(app_id, "onescreenapp") == 0) - emit ev_handler->signalOnReplyShowWindow(app_id); +static void +application_state_event(void *data, struct agl_shell_desktop *agl_shell_desktop, + const char *app_id, const char *app_data, uint32_t app_state, uint32_t app_role) +{ + /* unused */ + (void) data; + (void) app_id; + (void) app_data; + (void) app_role; + (void) app_state; + (void) agl_shell_desktop; } static const struct agl_shell_desktop_listener agl_shell_desk_listener = { application_id_event, + application_state_event, }; static struct agl_shell_desktop * @@ -202,7 +213,10 @@ void EventHandler::showWindow(QString id, QString json) { if (shell_desktop) { struct wl_output *output = getWlOutput(qApp->screens().first()); - agl_shell_desktop_activate_app(shell_desktop, id.toStdString().c_str(), output); + agl_shell_desktop_activate_app(shell_desktop, + id.toStdString().c_str(), + json.toStdString().c_str(), + output); } qInfo() << "data from json: " << json.toStdString().c_str();