summaryrefslogtreecommitdiffstats
path: root/src/layout.c
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2020-04-20 19:37:00 +0300
committerMarius Vlad <marius.vlad@collabora.com>2020-05-12 21:56:35 +0300
commitee9259703dc1d46339197c0d3a30e18556d708c9 (patch)
tree083f3417c379085711d276fa536148d55fcf47a8 /src/layout.c
parent65f9de0a549b0af779c5bad7468aa757d57db6d4 (diff)
policy: Add a new policy hook for deactivating apps
Bug-AGL: SPEC-3269 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I7260626819b78ff7e2a245dc0a5ef566919220f7
Diffstat (limited to 'src/layout.c')
-rw-r--r--src/layout.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/layout.c b/src/layout.c
index 0e7aaaf..6f6c763 100644
--- a/src/layout.c
+++ b/src/layout.c
@@ -503,11 +503,17 @@ ivi_layout_deactivate(struct ivi_compositor *ivi, const char *app_id)
{
struct ivi_surface *surf;
struct ivi_output *ivi_output;
+ struct ivi_policy *policy = ivi->policy;
surf = ivi_find_app(ivi, app_id);
if (!surf)
return;
+ if (policy && policy->api.surface_deactivate &&
+ !policy->api.surface_deactivate(surf, surf->ivi)) {
+ return;
+ }
+
ivi_output = ivi_layout_get_output_from_surface(surf);
weston_log("deactiving %s\n", app_id);