summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUcan, Emre (ADITG/SW1) <eucan@de.adit-jv.com>2016-03-17 14:36:51 +0000
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>2016-03-18 12:41:15 +0200
commit783cb4dcfef5eb0822460107e6d9eff0bd2e2f7c (patch)
tree60ddb941f04c900bc274c9652283bfa99fb8f1a5
parentaab1d368831c417b6cfc9df9ce8084286448ab86 (diff)
hmi-controller: fix wrong background surface size
In current implementation, the size of the first application layer is used for the background image of a display. This is wrong because: 1. The background surface should be fullscreen. 2. Each display could have different resolution. We should use the size of the base layer of each display for the background image. Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-rw-r--r--ivi-shell/hmi-controller.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/ivi-shell/hmi-controller.c b/ivi-shell/hmi-controller.c
index 0b932d62..e8fcf137 100644
--- a/ivi-shell/hmi-controller.c
+++ b/ivi-shell/hmi-controller.c
@@ -915,14 +915,10 @@ ivi_hmi_controller_set_background(struct hmi_controller *hmi_ctrl,
struct ivi_layout_surface *ivisurf = NULL;
struct hmi_controller_layer *base_layer = NULL;
struct ivi_layout_layer *ivilayer = NULL;
- struct hmi_controller_layer *application_layer =
- wl_container_of(hmi_ctrl->application_layer_list.prev,
- application_layer,
- link);
- const int32_t dstx = application_layer->x;
- const int32_t dsty = application_layer->y;
- const int32_t width = application_layer->width;
- const int32_t height = application_layer->height;
+ int32_t dstx;
+ int32_t dsty;
+ int32_t width;
+ int32_t height;
int32_t ret = 0;
int32_t i = 0;
@@ -930,7 +926,10 @@ ivi_hmi_controller_set_background(struct hmi_controller *hmi_ctrl,
uint32_t *add_surface_id = wl_array_add(&hmi_ctrl->ui_widgets,
sizeof(*add_surface_id));
*add_surface_id = id_surface + (i * hmi_ctrl->ui_setting.surface_id_offset);
-
+ dstx = base_layer->x;
+ dsty = base_layer->y;
+ width = base_layer->width;
+ height = base_layer->height;
ivilayer = base_layer->ivilayer;
ivisurf = ivi_layout_interface->get_surface_from_id(*add_surface_id);