aboutsummaryrefslogtreecommitdiffstats
path: root/homescreen/src/homescreenhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'homescreen/src/homescreenhandler.cpp')
-rw-r--r--homescreen/src/homescreenhandler.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/homescreen/src/homescreenhandler.cpp b/homescreen/src/homescreenhandler.cpp
index 2858ef4..e61f0de 100644
--- a/homescreen/src/homescreenhandler.cpp
+++ b/homescreen/src/homescreenhandler.cpp
@@ -18,12 +18,17 @@
// a user session by systemd
#define LAUNCHER_APP_ID "launcher"
+static struct wl_output *
+getWlOutput(QPlatformNativeInterface *native, QScreen *screen);
+
HomescreenHandler::HomescreenHandler(Shell *_aglShell, ApplicationLauncher *launcher, QObject *parent) :
QObject(parent),
aglShell(_aglShell)
{
mp_launcher = launcher;
mp_applauncher_client = new AppLauncherClient();
+ QPlatformNativeInterface *native = qApp->platformNativeInterface();
+ m_output = getWlOutput(native, qApp->screens().first());
//
// The "started" event is received any time a start request is made to applaunchd,
@@ -88,15 +93,13 @@ void HomescreenHandler::addAppToStack(const QString& app_id)
void HomescreenHandler::activateApp(const QString& app_id)
{
struct agl_shell *agl_shell = aglShell->shell.get();
- QPlatformNativeInterface *native = qApp->platformNativeInterface();
- struct wl_output *output = getWlOutput(native, qApp->screens().first());
if (mp_launcher) {
mp_launcher->setCurrent(app_id);
}
HMI_DEBUG("HomeScreen", "Activating application %s", app_id.toStdString().c_str());
- agl_shell_activate_app(agl_shell, app_id.toStdString().c_str(), output);
+ agl_shell_activate_app(agl_shell, app_id.toStdString().c_str(), m_output);
}
void HomescreenHandler::deactivateApp(const QString& app_id)