From a37400d73417dc02511813833b8f4d9b91e40a11 Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Wed, 22 Jul 2020 22:27:21 -0400 Subject: Add workaround for top panel button highlighting The switch to the new compositor removed the callback to update the top panel button highlight since it was being driven by the Event_ScreenUpdated event from the old windowmanager. For now, work around this by driving the ApplicationLauncher's setCurrent method from the appropriate place in the HomescreenHandler object's tapShortcut method. If a generic mechanism for notifications on application expose becomes available via agl-shell-desktop, that should be used instead. Additionally, add an explicit call to setCurrent on initialization to highlight the top panel Launcher button, matching the actual initial UI state. Bug-AGL: SPEC-3510 Signed-off-by: Scott Murray Change-Id: Ied5dd8e78195d061585510e60a758559ca4f69b3 --- homescreen/src/homescreenhandler.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'homescreen/src/homescreenhandler.cpp') diff --git a/homescreen/src/homescreenhandler.cpp b/homescreen/src/homescreenhandler.cpp index bf98a53..e31f122 100644 --- a/homescreen/src/homescreenhandler.cpp +++ b/homescreen/src/homescreenhandler.cpp @@ -24,11 +24,11 @@ void* HomescreenHandler::myThis = 0; -HomescreenHandler::HomescreenHandler(Shell *_aglShell, QObject *parent) : +HomescreenHandler::HomescreenHandler(Shell *_aglShell, ApplicationLauncher *launcher, QObject *parent) : QObject(parent), aglShell(_aglShell) { - + mp_launcher = launcher; } HomescreenHandler::~HomescreenHandler() @@ -113,6 +113,10 @@ void HomescreenHandler::tapShortcut(QString application_id) // the first time. Later calls to HomescreenHandler::tapShortcut will // require calling 'agl_shell_activate_app' agl_shell_activate_app(agl_shell, application_id.toStdString().c_str(), output); + + if (mp_launcher) { + mp_launcher->setCurrent(application_id); + } } void HomescreenHandler::onRep_static(struct json_object* reply_contents) -- cgit 1.2.3-korg