From fc41fa6da7f64262a7bbc4313b920762e1a31d15 Mon Sep 17 00:00:00 2001 From: Marius Vlad Date: Fri, 29 May 2020 13:30:15 +0300 Subject: homescreenhandler: Add the ability to specify the output based on the screen Pass the output when activing the surface in Launcher.qml Bug-AGL: SPEC-3447 Signed-off-by: Marius Vlad Change-Id: I4b8f03c90712290f580a570cd2644a4bc44687c5 --- launcher/src/homescreenhandler.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'launcher/src/homescreenhandler.cpp') diff --git a/launcher/src/homescreenhandler.cpp b/launcher/src/homescreenhandler.cpp index 3c16c23..4d98414 100644 --- a/launcher/src/homescreenhandler.cpp +++ b/launcher/src/homescreenhandler.cpp @@ -172,7 +172,7 @@ void HomescreenHandler::init(int port, const char *token, QString myname) }); } -void HomescreenHandler::tapShortcut(QString application_id) +void HomescreenHandler::tapShortcut(QString application_id, QString output_name) { HMI_DEBUG("Launcher","tapShortcut %s", application_id.toStdString().c_str()); struct json_object* j_json = json_object_new_object(); @@ -181,7 +181,10 @@ void HomescreenHandler::tapShortcut(QString application_id) json_object_object_add(j_json, "area", value); mp_hs->showWindow(application_id.toStdString().c_str(), j_json); - aglShell->activate_app(nullptr, application_id, nullptr); + if (output_name.isEmpty()) + aglShell->activate_app(nullptr, application_id, nullptr); + else + aglShell->activate_app_by_screen(output_name, application_id, nullptr); } void HomescreenHandler::onRep_static(struct json_object* reply_contents) -- cgit 1.2.3-korg