summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/layout.c6
-rw-r--r--src/policy.h1
2 files changed, 7 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);
diff --git a/src/policy.h b/src/policy.h
index 947c326..2499278 100644
--- a/src/policy.h
+++ b/src/policy.h
@@ -70,6 +70,7 @@ struct ivi_policy_api {
bool (*surface_create)(struct ivi_surface *surf, void *user_data);
bool (*surface_commited)(struct ivi_surface *surf, void *user_data);
bool (*surface_activate)(struct ivi_surface *surf, void *user_data);
+ bool (*surface_deactivate)(struct ivi_surface *surf, void *user_data);
bool (*surface_activate_by_default)(struct ivi_surface *surf, void *user_data);