aboutsummaryrefslogtreecommitdiffstats
path: root/homescreen/src/shell.h
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2022-11-01 13:29:43 +0200
committerMarius Vlad <marius.vlad@collabora.com>2023-01-20 11:14:12 +0200
commitbb4c83e294f109497f504c0dd8e23143c07883d6 (patch)
tree393a77c13dd4979e6f3480ae83c4792ece55207c /homescreen/src/shell.h
parentd4f3ddfbad7a64937f00f13ba964e18d33effbb0 (diff)
homescreen: Add support for defining an activation area
This is an example on how to use it, and it enables a new variable HOMESCREEN_EMBEDDED_PANELS to test it out. It gives out the same rectangle are we have in the homescreen demo, but the panels are this time embedded into the background surface, rather than being a separate surface. This introduces a new Qml file, background_with_panels which integrates both the top and the bottom panel into a single qml, which main.cpp loads. While at it, this corrects up the indentation we have in shell.cpp file and sets up the default output in homeScreenHandler constructor. Due to this way integrates and works, it should *not* be visual change between the two (the normal, two panel surfaces) and this version. It can used as a example how to integrate this better, when managing multiple surfaces is not easy to be done by the toolkit or runtime. Bug-AGL: SPEC-4594 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Ibe274b336b15e9713d0cdded5424cc8e92257d7f
Diffstat (limited to 'homescreen/src/shell.h')
-rw-r--r--homescreen/src/shell.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/homescreen/src/shell.h b/homescreen/src/shell.h
index a6e3f7e..51990d8 100644
--- a/homescreen/src/shell.h
+++ b/homescreen/src/shell.h
@@ -41,16 +41,20 @@
class Shell : public QObject
{
- Q_OBJECT
+ Q_OBJECT
public:
- std::shared_ptr<struct agl_shell> shell;
-
- Shell(std::shared_ptr<struct agl_shell> shell, QObject *parent = nullptr) :
- QObject(parent), shell(shell)
- {}
-public slots:
- void activate_app(QWindow *win, const QString &app_id);
+ std::shared_ptr<struct agl_shell> shell;
+
+ Shell(std::shared_ptr<struct agl_shell> shell, QObject *parent = nullptr) :
+ QObject(parent), shell(shell)
+ {}
+ public slots:
+ void activate_app(QWindow *win, const QString &app_id);
+ void set_activate_region(struct wl_output *output, int32_t x, int32_t y,
+ int32_t width, int32_t height);
+private:
+ struct wl_region *m_region = nullptr;
};
#endif // SHELLHANDLER_H