summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2014-05-12 15:56:16 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2014-05-14 14:45:49 +0100
commit721c0f13ab80eb209983c1d73e168df4ffb70ddc (patch)
tree14200089b16f86988dd45405bcf1c307efdb5f2f
parent74f7c94c9186f8fc9ea8f50ab5d5f805d679d05f (diff)
parent7d4cb85a941cf16c063d2ce577a4f718b6c70138 (diff)
downloadweston-baserock/genivi/weston-ivi-shell-patches.tar.gz
Update to tag weston-ivi-shell-1.4.0-v13 for GENIVI Horizon 1.0 releasebaserock/genivi/weston-ivi-shell-patches
The stable branch for Weston in the Baserock GENIVI Baseline is now baserock/genivi/weston-ivi-shell-patches. Previously we built from a branch which is an ancestor to this one named baserock/genivi/weston-ivi-shell-1.4.0-v12, but if we continued to follow that naming pattern then we'd end up with many branches. Merge remote-tracking branch 'genivi/weston-ivi-shell-1.4.0-v13' into hawkdevtrove/sam/baserock-14.20 Conflicts: ivi-shell/input-panel-ivi.c ivi-shell/ivi-shell.c ivi-shell/ivi-shell.h
-rw-r--r--ivi-shell/input-panel-ivi.c4
-rw-r--r--ivi-shell/ivi-shell.c8
-rw-r--r--ivi-shell/ivi-shell.h1
-rw-r--r--ivi-shell/weston-layout.c57
4 files changed, 40 insertions, 30 deletions
diff --git a/ivi-shell/input-panel-ivi.c b/ivi-shell/input-panel-ivi.c
index dfcb83f6..061e78e7 100644
--- a/ivi-shell/input-panel-ivi.c
+++ b/ivi-shell/input-panel-ivi.c
@@ -2,6 +2,7 @@
* Copyright © 2010-2012 Intel Corporation
* Copyright © 2011-2012 Collabora, Ltd.
* Copyright © 2013 Raspberry Pi Foundation
+ * Copyright © 2013 DENSO CORPORATION
*
* Permission to use, copy, modify, distribute, and sell this software and
* its documentation for any purpose is hereby granted without fee, provided
@@ -63,7 +64,8 @@ show_input_panels(struct wl_listener *listener, void *data)
shell->showing_input_panels = true;
if (!shell->locked)
- weston_layout_add_panel_layer(&shell->input_panel_layer);
+ wl_list_insert(&shell->panel_layer.link,
+ &shell->input_panel_layer.link);
wl_list_for_each_safe(ipsurf, next,
&shell->input_panel.surfaces, link) {
diff --git a/ivi-shell/ivi-shell.c b/ivi-shell/ivi-shell.c
index 8bd61b8f..ae8d06eb 100644
--- a/ivi-shell/ivi-shell.c
+++ b/ivi-shell/ivi-shell.c
@@ -290,9 +290,10 @@ static void
init_ivi_shell(struct weston_compositor *ec, struct ivi_shell *shell)
{
shell->compositor = ec;
-
- wl_list_init(&ec->layer_list);
wl_list_init(&shell->ivi_surface_list);
+
+ weston_layer_init(&shell->panel_layer, &ec->cursor_layer.link);
+ weston_layer_init(&shell->input_panel_layer, NULL);
}
/**
@@ -313,13 +314,12 @@ module_init(struct weston_compositor *ec,
}
init_ivi_shell(ec, shell);
+
weston_layout_initWithCompositor(ec);
shell->destroy_listener.notify = shell_destroy;
wl_signal_add(&ec->destroy_signal, &shell->destroy_listener);
- weston_layer_init(&shell->input_panel_layer, NULL);
-
if (input_panel_setup(shell) < 0)
return -1;
diff --git a/ivi-shell/ivi-shell.h b/ivi-shell/ivi-shell.h
index 5580d3d0..ad94f642 100644
--- a/ivi-shell/ivi-shell.h
+++ b/ivi-shell/ivi-shell.h
@@ -37,6 +37,7 @@ struct ivi_shell
struct wl_listener hide_input_panel_listener;
struct wl_listener update_input_panel_listener;
+ struct weston_layer panel_layer;
struct weston_layer input_panel_layer;
bool locked;
diff --git a/ivi-shell/weston-layout.c b/ivi-shell/weston-layout.c
index 29264df7..4a9f501b 100644
--- a/ivi-shell/weston-layout.c
+++ b/ivi-shell/weston-layout.c
@@ -169,7 +169,6 @@ struct weston_layout_layer {
uint32_t id_layer;
struct weston_layout *layout;
- struct weston_layer el;
struct weston_layout_LayerProperties prop;
uint32_t event_mask;
@@ -224,8 +223,7 @@ struct weston_layout {
struct wl_list list_configure;
} surface_notification;
- /* to enable displaying cursor*/
- int32_t is_cursor_enabled;
+ struct weston_layer layout_layer;
};
struct weston_layout ivilayout = {0};
@@ -349,6 +347,7 @@ westonsurface_destroy_from_ivisurface(struct wl_listener *listener, void *data)
surface_destroy_listener);
ivisurf->surface = NULL;
ivisurf->view = NULL;
+ weston_layout_surfaceRemove(ivisurf);
}
/**
@@ -794,7 +793,6 @@ commit_list_layer(struct weston_layout *layout)
static void
commit_list_screen(struct weston_layout *layout)
{
- struct weston_compositor *ec = layout->compositor;
struct weston_layout_screen *iviscrn = NULL;
struct weston_layout_layer *ivilayer = NULL;
struct weston_layout_layer *next = NULL;
@@ -823,36 +821,28 @@ commit_list_screen(struct weston_layout *layout)
iviscrn->event_mask = 0;
}
- /* For rendering */
- wl_list_init(&ec->layer_list);
+ /* Clear view list of layout layer */
+ wl_list_init(&layout->layout_layer.view_list);
+
wl_list_for_each(ivilayer, &iviscrn->order.list_layer, order.link) {
- if (ivilayer->prop.visibility == 0) {
- continue;
- }
- wl_list_insert(&ec->layer_list, &ivilayer->el.link);
- wl_list_init(&ivilayer->el.view_list);
+ if (ivilayer->prop.visibility == 0)
+ continue;
wl_list_for_each(ivisurf, &ivilayer->order.list_surface, order.link) {
- if (ivisurf->prop.visibility == 0) {
- continue;
- }
- if (ivisurf->surface == NULL || ivisurf->view == NULL) {
+ if (ivisurf->prop.visibility == 0)
+ continue;
+ if (ivisurf->surface == NULL || ivisurf->view == NULL)
continue;
- }
- wl_list_insert(&ivilayer->el.view_list,
+ wl_list_insert(&layout->layout_layer.view_list,
&ivisurf->view->layer_link);
+
ivisurf->surface->output = iviscrn->output;
}
}
- /*Add cursor layer if cursor is configured.*/
- if (layout->is_cursor_enabled) {
- wl_list_insert(&ec->layer_list, &ec->cursor_layer.link);
- }
-
break;
}
}
@@ -928,6 +918,9 @@ weston_layout_initWithCompositor(struct weston_compositor *ec)
wl_list_init(&layout->surface_notification.list_remove);
wl_list_init(&layout->surface_notification.list_configure);
+ /* Add layout_layer at the last of weston_compositor.layer_list */
+ weston_layer_init(&layout->layout_layer, ec->layer_list.prev);
+
create_screen(ec);
struct weston_config *config = weston_config_parse("weston.ini");
@@ -937,8 +930,10 @@ weston_layout_initWithCompositor(struct weston_compositor *ec)
/*A cursor is configured if weston.ini has keys.*/
char* cursor_theme = NULL;
weston_config_section_get_string(s, "cursor-theme", &cursor_theme, NULL);
- layout->is_cursor_enabled = (NULL != cursor_theme);
- free(cursor_theme);
+ if (cursor_theme)
+ free(cursor_theme);
+ else
+ wl_list_remove(&ec->cursor_layer.link);
weston_config_destroy(config);
}
@@ -2002,6 +1997,7 @@ weston_layout_layerSetRenderOrder(struct weston_layout_layer *ivilayer,
{
struct weston_layout *layout = get_instance();
struct weston_layout_surface *ivisurf = NULL;
+ struct weston_layout_surface *next = NULL;
uint32_t *id_surface = NULL;
uint32_t i = 0;
@@ -2010,6 +2006,11 @@ weston_layout_layerSetRenderOrder(struct weston_layout_layer *ivilayer,
return -1;
}
+ wl_list_for_each_safe(ivisurf, next,
+ &ivilayer->pending.list_surface, pending.link) {
+ wl_list_init(&ivisurf->pending.link);
+ }
+
wl_list_init(&ivilayer->pending.list_surface);
if (pSurface == NULL) {
@@ -2334,6 +2335,7 @@ weston_layout_screenSetRenderOrder(struct weston_layout_screen *iviscrn,
{
struct weston_layout *layout = get_instance();
struct weston_layout_layer *ivilayer = NULL;
+ struct weston_layout_layer *next = NULL;
uint32_t *id_layer = NULL;
uint32_t i = 0;
@@ -2342,6 +2344,11 @@ weston_layout_screenSetRenderOrder(struct weston_layout_screen *iviscrn,
return -1;
}
+ wl_list_for_each_safe(ivilayer, next,
+ &iviscrn->pending.list_layer, pending.link) {
+ wl_list_init(&ivilayer->pending.link);
+ }
+
wl_list_init(&iviscrn->pending.list_layer);
if (pLayer == NULL) {
@@ -2351,7 +2358,7 @@ weston_layout_screenSetRenderOrder(struct weston_layout_screen *iviscrn,
for (i = 0; i < number; i++) {
id_layer = &pLayer[i]->id_layer;
wl_list_for_each(ivilayer, &layout->list_layer, link) {
- if (*id_layer == ivilayer->id_layer) {
+ if (*id_layer != ivilayer->id_layer) {
continue;
}