hmi-controller: fix wrong panel width
The width of the first base layer is used for all panels. Every display has a base layer which is as big as the display. Therefore, it is wrong to use the width of the first base layer for all panels, because every display could have a different resolution. Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This commit is contained in:
committed by
Pekka Paalanen
parent
783cb4dcfe
commit
c6459c495d
@@ -961,12 +961,9 @@ ivi_hmi_controller_set_panel(struct hmi_controller *hmi_ctrl,
|
|||||||
uint32_t id_surface)
|
uint32_t id_surface)
|
||||||
{
|
{
|
||||||
struct ivi_layout_surface *ivisurf = NULL;
|
struct ivi_layout_surface *ivisurf = NULL;
|
||||||
struct hmi_controller_layer *base_layer =
|
struct hmi_controller_layer *base_layer;
|
||||||
wl_container_of(hmi_ctrl->base_layer_list.prev,
|
|
||||||
base_layer,
|
|
||||||
link);
|
|
||||||
struct ivi_layout_layer *ivilayer = NULL;
|
struct ivi_layout_layer *ivilayer = NULL;
|
||||||
const int32_t width = base_layer->width;
|
int32_t width;
|
||||||
int32_t ret = 0;
|
int32_t ret = 0;
|
||||||
int32_t panel_height = hmi_ctrl->hmi_setting->panel_height;
|
int32_t panel_height = hmi_ctrl->hmi_setting->panel_height;
|
||||||
const int32_t dstx = 0;
|
const int32_t dstx = 0;
|
||||||
@@ -986,6 +983,7 @@ ivi_hmi_controller_set_panel(struct hmi_controller *hmi_ctrl,
|
|||||||
assert(!ret);
|
assert(!ret);
|
||||||
|
|
||||||
dsty = base_layer->height - panel_height;
|
dsty = base_layer->height - panel_height;
|
||||||
|
width = base_layer->width;
|
||||||
|
|
||||||
ret = ivi_layout_interface->surface_set_destination_rectangle(
|
ret = ivi_layout_interface->surface_set_destination_rectangle(
|
||||||
ivisurf, dstx, dsty, width, panel_height);
|
ivisurf, dstx, dsty, width, panel_height);
|
||||||
|
|||||||
Reference in New Issue
Block a user