summaryrefslogtreecommitdiffstats
path: root/src/layout.c
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2020-03-06 22:51:10 +0200
committerMarius Vlad <marius.vlad@collabora.com>2020-03-11 16:44:10 +0200
commit0a932bc7d66b062e6bf9cdbe40a2178ed47dd6c8 (patch)
tree99a1e8c7637981bda0cd8520e444d911a1bc7b2a /src/layout.c
parent58a3fe5c2923499160b270c7ef18a8004ee2f537 (diff)
layout: Allow by default to activate the application
Installs, for the default policy, a callback that allows it. Bug-AGL: SPEC-3217 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Ic0f1a7db93df480d263db8240592f65a8864ccd6
Diffstat (limited to 'src/layout.c')
-rw-r--r--src/layout.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/layout.c b/src/layout.c
index b531ed1..94327c4 100644
--- a/src/layout.c
+++ b/src/layout.c
@@ -243,12 +243,15 @@ ivi_layout_desktop_committed(struct ivi_surface *surf)
output = surf->desktop.pending_output;
if (!output) {
struct ivi_output *ivi_bg_output;
+ struct ivi_policy *policy = surf->ivi->policy;
+
+ if (policy && policy->api.surface_activate_by_default)
+ if (policy->api.surface_activate_by_default(surf, surf->ivi))
+ goto skip_config_check;
- /* FIXME: This should be changed to determine if the policy
- * database allows that to happen */
if (!surf->ivi->quirks.activate_apps_by_default)
return;
-
+skip_config_check:
ivi_bg_output = ivi_layout_find_bg_output(surf->ivi);
/* use the output of the bg to activate the app on start-up by