#include <libweston/libweston.h>
#include <libweston-desktop/libweston-desktop.h>
+#include "agl-shell-desktop-server-protocol.h"
+
#define AGL_COMP_DEBUG
static void
output->area.x, output->area.y);
}
-static struct ivi_surface *
+struct ivi_surface *
ivi_find_app(struct ivi_compositor *ivi, const char *app_id)
{
struct ivi_surface *surf;
/* force repaint of the entire output */
weston_output_damage(output->output);
}
-
}
static struct ivi_output *
{
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);