Code Review
/
src
/
agl-compositor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
policy: Add another hook for controlling the application state change
[src/agl-compositor.git]
/
src
/
shell.c
diff --git
a/src/shell.c
b/src/shell.c
index
aa63b86
..
96f3c0a
100644
(file)
--- a/
src/shell.c
+++ b/
src/shell.c
@@
-24,6
+24,7
@@
*/
#include "ivi-compositor.h"
*/
#include "ivi-compositor.h"
+#include "policy.h"
#include <assert.h>
#include <errno.h>
#include <assert.h>
#include <errno.h>
@@
-517,12
+518,18
@@
shell_advertise_app_state(struct ivi_compositor *ivi, const char *app_id,
struct desktop_client *dclient;
uint32_t app_role;
struct ivi_surface *surf = ivi_find_app(ivi, app_id);
struct desktop_client *dclient;
uint32_t app_role;
struct ivi_surface *surf = ivi_find_app(ivi, app_id);
+ struct ivi_policy *policy = ivi->policy;
/* FIXME: should queue it here and see when binding agl-shell-desktop
* if there are any to be sent */
if (!surf)
return;
/* FIXME: should queue it here and see when binding agl-shell-desktop
* if there are any to be sent */
if (!surf)
return;
+ if (policy && policy->api.surface_advertise_state_change &&
+ !policy->api.surface_advertise_state_change(surf, surf->ivi)) {
+ return;
+ }
+
app_role = surf->role;
if (app_role == IVI_SURFACE_ROLE_POPUP)
app_role = AGL_SHELL_DESKTOP_APP_ROLE_POPUP;
app_role = surf->role;
if (app_role == IVI_SURFACE_ROLE_POPUP)
app_role = AGL_SHELL_DESKTOP_APP_ROLE_POPUP;