AglShellGrpcClient: Activate windows with gRPC
[apps/homescreen.git] / homescreen / src / shell.cpp
index 1427b7c..b7583c1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2019 Collabora Ltd.
+ * Copyright © 2019, 2022 Collabora Ltd.
  *
  * Permission is hereby granted, free of charge, to any person obtaining
  * a copy of this software and associated documentation files (the
@@ -26,7 +26,8 @@
 #include <QGuiApplication>
 #include <QDebug>
 #include "shell.h"
-#include <qpa/qplatformnativeinterface.h>
+// defined by meson build file
+#include QT_QPA_HEADER
 #include <stdio.h>
 
 static struct wl_output *
@@ -49,3 +50,11 @@ void Shell::activate_app(QWindow *win, const QString &app_id)
                            app_id.toStdString().c_str(),
                            output);
 }
+
+void Shell::set_activate_region(struct wl_output *output, int32_t x, int32_t y,
+                               int32_t width, int32_t height)
+{
+#ifdef AGL_SHELL_SET_ACTIVATE_REGION_SINCE_VERSION
+       agl_shell_set_activate_region(this->shell.get(), output, x, y, width, height);
+#endif
+}