diff options
author | Kazumasa Mitsunari <knimitz@witz-inc.co.jp> | 2018-12-07 20:38:31 +0900 |
---|---|---|
committer | Kazumasa Mitsunari <knimitz@witz-inc.co.jp> | 2018-12-07 20:41:43 +0900 |
commit | d366f0cf37187d46e0fd752772bdbd34e2b39ebf (patch) | |
tree | 975ba7278ac9d8f199c95fba9347a65e0d7b653c | |
parent | 6411e275d152d77f7db9bd4ea434d82af7347815 (diff) |
Modify graphic role
Window Manager set role name as lower_case,
then change role as lower_case.
Bug-AGL: SPEC-1754
Change-Id: Ib85b00678c3162da9a4c03be48c04e486e237b40
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
-rw-r--r-- | app/main.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/app/main.cpp b/app/main.cpp index 6f3c3c9..5b58bd0 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -33,7 +33,7 @@ int main(int argc, char *argv[]) { - QString myname = QString("Phone"); + QString graphic_role = QString("phone"); QGuiApplication app(argc, argv); @@ -79,21 +79,21 @@ int main(int argc, char *argv[]) AGLScreenInfo screenInfo(qwm->get_scale_factor()); // Request a surface as described in layers.json windowmanager’s file - if (qwm->requestSurface(myname) != 0) { + if (qwm->requestSurface(graphic_role) != 0) { exit(EXIT_FAILURE); } // Create an event callback against an event type. Here a lambda is called when SyncDraw event occurs - qwm->set_event_handler(QLibWindowmanager::Event_SyncDraw, [qwm, myname](json_object *object) { - Q_UNUSED(object); - qwm->endDraw(myname); + qwm->set_event_handler(QLibWindowmanager::Event_SyncDraw, [qwm, graphic_role](json_object *object) { + Q_UNUSED(object); + qwm->endDraw(graphic_role); }); // 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, myname](json_object *object){ - qDebug("Surface %s got tapShortcut\n", myname.toStdString().c_str()); - qwm->activateSurface(myname); + hs->set_event_handler(LibHomeScreen::Event_TapShortcut, [qwm, graphic_role](json_object *object){ + qDebug("Surface %s got tapShortcut\n", graphic_role.toStdString().c_str()); + qwm->activateWindow(graphic_role); }); qmlRegisterUncreatableType<NumberType>("NumberType", 1, 0, "NumberType", "Not creatable as it is an enum type"); @@ -102,7 +102,7 @@ int main(int argc, char *argv[]) engine.load(QUrl(QStringLiteral("qrc:/Phone.qml"))); QObject *root = engine.rootObjects().first(); QQuickWindow *window = qobject_cast<QQuickWindow *>(root); - QObject::connect(window, SIGNAL(frameSwapped()), qwm, SLOT(slotActivateSurface() + QObject::connect(window, SIGNAL(frameSwapped()), qwm, SLOT(slotActivateWindow() )); } return app.exec(); |