We are missing the activate_by_default hooks for split, pop-up and and
fullscreen roles. Part of that is due to the fact that these roles are
handled a bit differently that the remote and desktop roles.
Note, these hooks are different than the commit ones -- which are
'installed' a bit earlier. This means that there was still a possiblity
one might've used that hook to retrieve the surface role for instance,
and act accordingly.
Reported-by: Scott Murray <scott.murray@konsulko.com>
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I634bbb5915e65880c1d47363cf6dae529feac9d2
ivi_layout_fullscreen_committed(struct ivi_surface *surface)
{
struct ivi_compositor *ivi = surface->ivi;
ivi_layout_fullscreen_committed(struct ivi_surface *surface)
{
struct ivi_compositor *ivi = surface->ivi;
+ struct ivi_policy *policy = ivi->policy;
struct weston_desktop_surface *dsurface = surface->dsurface;
struct weston_surface *wsurface =
struct weston_desktop_surface *dsurface = surface->dsurface;
struct weston_surface *wsurface =
struct weston_view *view = surface->view;
struct weston_geometry geom;
struct weston_view *view = surface->view;
struct weston_geometry geom;
+ if (policy && policy->api.surface_activate_by_default &&
+ !policy->api.surface_activate_by_default(surface, surface->ivi))
+ return;
+
if (surface->view->is_mapped)
return;
if (surface->view->is_mapped)
return;
ivi_layout_split_committed(struct ivi_surface *surface)
{
struct ivi_compositor *ivi = surface->ivi;
ivi_layout_split_committed(struct ivi_surface *surface)
{
struct ivi_compositor *ivi = surface->ivi;
+ struct ivi_policy *policy = ivi->policy;
struct weston_desktop_surface *dsurface = surface->dsurface;
struct weston_surface *wsurface =
struct weston_desktop_surface *dsurface = surface->dsurface;
struct weston_surface *wsurface =
x = woutput->x;
y = woutput->y;
x = woutput->x;
y = woutput->y;
+ if (policy && policy->api.surface_activate_by_default &&
+ !policy->api.surface_activate_by_default(surface, surface->ivi))
+ return;
+
if (surface->view->is_mapped)
return;
if (surface->view->is_mapped)
return;
ivi_layout_popup_committed(struct ivi_surface *surface)
{
struct ivi_compositor *ivi = surface->ivi;
ivi_layout_popup_committed(struct ivi_surface *surface)
{
struct ivi_compositor *ivi = surface->ivi;
+ struct ivi_policy *policy = ivi->policy;
struct weston_desktop_surface *dsurface = surface->dsurface;
struct weston_surface *wsurface =
struct weston_desktop_surface *dsurface = surface->dsurface;
struct weston_surface *wsurface =
struct weston_view *view = surface->view;
struct weston_view *view = surface->view;
+ if (policy && policy->api.surface_activate_by_default &&
+ !policy->api.surface_activate_by_default(surface, surface->ivi))
+ return;
+
if (surface->view->is_mapped)
return;
if (surface->view->is_mapped)
return;