From: Scott Murray Date: Thu, 22 Nov 2018 15:03:32 +0000 (+0000) Subject: Merge "homescreen: bluetooth: switch bluetooth power status" X-Git-Tag: 6.99.1^0 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=42fe4411428f81427ce8993886e28504012219d2;hp=0d1f9cfc3afc44f28c5e2d1f3ea06b02feb5f819;p=apps%2Fhomescreen.git Merge "homescreen: bluetooth: switch bluetooth power status" --- diff --git a/homescreen/src/main.cpp b/homescreen/src/main.cpp index 620c869..8ecfd68 100644 --- a/homescreen/src/main.cpp +++ b/homescreen/src/main.cpp @@ -78,6 +78,7 @@ int main(int argc, char *argv[]) int port = 1700; QString token = "wm"; + QString graphic_role = "homescreen"; // defined in layers.json in Window Manager if (positionalArguments.length() == 2) { port = positionalArguments.takeFirst().toInt(); @@ -99,12 +100,12 @@ int main(int argc, char *argv[]) AGLScreenInfo screenInfo(layoutHandler->get_scale_factor()); - if (layoutHandler->requestSurface(QString("HomeScreen")) != 0) { + if (layoutHandler->requestSurface(graphic_role) != 0) { exit(EXIT_FAILURE); } - layoutHandler->set_event_handler(QLibWindowmanager::Event_SyncDraw, [layoutHandler](json_object *object) { - layoutHandler->endDraw(QString("HomeScreen")); + layoutHandler->set_event_handler(QLibWindowmanager::Event_SyncDraw, [layoutHandler, &graphic_role](json_object *object) { + layoutHandler->endDraw(graphic_role); }); layoutHandler->set_event_handler(QLibWindowmanager::Event_ScreenUpdated, [layoutHandler, launcher](json_object *object) {