aboutsummaryrefslogtreecommitdiffstats
path: root/homescreen/src/homescreenhandler.cpp
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2022-08-05 19:56:29 +0300
committerMarius Vlad <marius.vlad@collabora.com>2022-08-06 13:30:09 +0300
commit13db32c880ca9ecc4fe230474330aef11c981f80 (patch)
treeccc5516c97dc297e565337a2e175a5c4d7f280cc /homescreen/src/homescreenhandler.cpp
parent74108a65e4c17687a6c5c95cc9bf801b0064d128 (diff)
homescreenhandler: Add support for splitsandbox/mvlad/react-to-split-events
Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I2d32a539e1f3bd5601c652b8fcf8888152258e07
Diffstat (limited to 'homescreen/src/homescreenhandler.cpp')
-rw-r--r--homescreen/src/homescreenhandler.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/homescreen/src/homescreenhandler.cpp b/homescreen/src/homescreenhandler.cpp
index c44cbb9..b1a99d8 100644
--- a/homescreen/src/homescreenhandler.cpp
+++ b/homescreen/src/homescreenhandler.cpp
@@ -54,6 +54,7 @@ void HomescreenHandler::init(void)
*/
connect(applaunch_iface, SIGNAL(started(QString)), this, SLOT(appStarted(QString)));
connect(applaunch_iface, SIGNAL(terminated(QString)), this, SLOT(appTerminated(QString)));
+ connect(applaunch_iface, SIGNAL(splited(QString, uint32_t)), this, SLOT(appSplit(QString, uint32_t)));
}
@@ -110,6 +111,20 @@ void HomescreenHandler::addAppToStack(const QString& application_id)
}
}
+void HomescreenHandler::appSplit(const QString& application_id, uint32_t orientation)
+{
+ struct agl_shell *agl_shell = aglShell->shell.get();
+ QPlatformNativeInterface *native = qApp->platformNativeInterface();
+ struct wl_output *output = getWlOutput(native, qApp->screens().first());
+
+ HMI_DEBUG("HomeScreen", "Split application %s", application_id.toStdString().c_str());
+
+ fprintf(stderr, "homescreen: doing a split for app %s with orientation passed %d\n",
+ application_id.toStdString().c_str(), orientation);
+ agl_shell_set_app_split(agl_shell, application_id.toStdString().c_str(),
+ orientation, output);
+}
+
void HomescreenHandler::appStarted(const QString& application_id)
{
struct agl_shell *agl_shell = aglShell->shell.get();