*/
#include "ivi-compositor.h"
+#include "policy.h"
#include <assert.h>
#include <string.h>
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
struct weston_desktop_surface *dsurf;
struct weston_view *view;
struct weston_geometry geom;
+ struct ivi_policy *policy = output->ivi->policy;
surf = ivi_find_app(ivi, app_id);
if (!surf)
return;
+
+ if (policy && policy->api.surface_activate &&
+ !policy->api.surface_activate(surf, surf->ivi)) {
+ return;
+ }
+
#ifdef AGL_COMP_DEBUG
weston_log("Found app_id %s\n", app_id);
#endif