X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=app%2Fmain.cpp;h=c5527a8c73786eab08e9619d69baa10df104f274;hb=refs%2Ftags%2Fguppy%2F6.99.4;hp=53ce4d554a88b8ad775bafc82f1791930915fcbb;hpb=6910d9325af0edb8bcbb88b918603e3a2cd8a446;p=apps%2Fmediaplayer.git diff --git a/app/main.cpp b/app/main.cpp index 53ce4d5..c5527a8 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -84,17 +84,15 @@ int main(int argc, char *argv[]) // HomeScreen hs->init(port, token.c_str()); - // Set the event handler for Event_TapShortcut which will activate the surface for windowmanager - hs->set_event_handler(LibHomeScreen::Event_TapShortcut, [qwm, &graphic_role](json_object *object){ - qDebug("Surface %s got tapShortcut\n", graphic_role.toStdString().c_str()); + // Set the event handler for Event_ShowWindow which will activate the surface for windowmanager + hs->set_event_handler(LibHomeScreen::Event_ShowWindow, [qwm, &graphic_role](json_object *object){ + qDebug("Surface %s got showWindow\n", graphic_role.toStdString().c_str()); qwm->activateWindow(graphic_role); }); context->setContextProperty("mediaplayer", new Mediaplayer(bindingAddress, context)); context->setContextProperty(QStringLiteral("screenInfo"), &screenInfo); - usleep(300000); - engine.load(QUrl(QStringLiteral("qrc:/MediaPlayer.qml"))); QObject *root = engine.rootObjects().first(); QQuickWindow *window = qobject_cast(root);