While nothing technically prevents the background surface role to
be activated, it turns out we don't actually track it so we a) couldn't
find it, and b) we attempted to resize it to an incorrect dimension.
Another small follow-up commit from 'Add manual activation area
configuration option' and with with commit 'agl-shell: Add support for
defining an activation area', which introduced the ability to designate
a certain area as the activation area.
v2: Keep the background surface always mapped
We now have more than one active surfaces at the same time, so we can't
unmap it as it needs to be always displayed.
Bug-AGL: SPEC-4594
Reported-by: Scott Murray <scott.murray@konsulko.com>
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
[backported to Needlefish branch]
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Change-Id: I8373c04c8f75e19a1efa4961c06ad36d7b6031cb
}
weston_view_set_output(view, woutput);
}
weston_view_set_output(view, woutput);
- weston_view_set_position(view,
- woutput->x + output->area.x,
- woutput->y + output->area.y);
+
+ if (surf->role != IVI_SURFACE_ROLE_BACKGROUND)
+ weston_view_set_position(view,
+ woutput->x + output->area.x,
+ woutput->y + output->area.y);
view->is_mapped = true;
surf->mapped = true;
view->surface->is_mapped = true;
if (output->active) {
view->is_mapped = true;
surf->mapped = true;
view->surface->is_mapped = true;
if (output->active) {
- output->active->view->is_mapped = false;
- output->active->view->surface->is_mapped = false;
+ /* keep the background surface mapped at all times */
+ if (output->active->role != IVI_SURFACE_ROLE_BACKGROUND) {
+ output->active->view->is_mapped = false;
+ output->active->view->surface->is_mapped = false;
- weston_layer_entry_remove(&output->active->view->layer_link);
+ weston_layer_entry_remove(&output->active->view->layer_link);
+ }
}
output->previous_active = output->active;
output->active = surf;
}
output->previous_active = output->active;
output->active = surf;
+ /* the background surface is already "maximized" so we don't need to
+ * add to the hidden layer */
+ if (surf->role == IVI_SURFACE_ROLE_BACKGROUND) {
+ ivi_layout_activate_complete(output, surf);
+ return;
+ }
+
ivi_layout_add_to_hidden_layer(surf, output);
}
ivi_layout_add_to_hidden_layer(surf, output);
}
agl_shell_desktop_advertise_application_id(ivi, surface);
}
agl_shell_desktop_advertise_application_id(ivi, surface);
}
+static void
+ivi_set_background_surface(struct ivi_surface *surface)
+{
+ struct ivi_compositor *ivi = surface->ivi;
+ assert(surface->role == IVI_SURFACE_ROLE_BACKGROUND);
+
+ wl_list_insert(&surface->ivi->surfaces, &surface->link);
+ agl_shell_desktop_advertise_application_id(ivi, surface);
+}
+
static void
ivi_set_desktop_surface_popup(struct ivi_surface *surface)
{
static void
ivi_set_desktop_surface_popup(struct ivi_surface *surface)
{
ivi->shell_client.ready = true;
wl_list_for_each(output, &ivi->outputs, link) {
ivi->shell_client.ready = true;
wl_list_for_each(output, &ivi->outputs, link) {
- if (output->background)
+ if (output->background &&
+ output->background->role == IVI_SURFACE_ROLE_BACKGROUND) {
+ /* track the background surface role as a "regular"
+ * surface so we can activate it */
+ ivi_set_background_surface(output->background);
remove_black_surface(output);
remove_black_surface(output);
ivi_layout_init(ivi, output);
}
ivi_layout_init(ivi, output);
}