From: Marius Vlad Date: Wed, 7 Apr 2021 19:16:02 +0000 (+0300) Subject: layout: Fix split role sending invalid dimensions X-Git-Tag: 11.91.0~6 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=e35c7858a788b468a317dc46520e03f14599cb0b;p=src%2Fagl-compositor.git layout: Fix split role sending invalid dimensions As we send from the beginning/start the size for the client, we'll be missing a checking when using split type of surfaces, which will result in invalid width/height passed to clients on configure events. Avoid using it entirely and assume for split roles to use half of the output by default. Bug-AGL: SPEC-3881 Signed-off-by: Marius Vlad Change-Id: Ia9728c9401cdd1ae918229853ddf7393e14f6cb1 --- diff --git a/src/layout.c b/src/layout.c index b1d8b3d..6c0af95 100644 --- a/src/layout.c +++ b/src/layout.c @@ -504,9 +504,7 @@ ivi_layout_split_committed(struct ivi_surface *surface) switch (surface->role) { case IVI_SURFACE_ROLE_SPLIT_V: - if (geom.width == woutput->width && - geom.height == woutput->height) - geom.width = (output->area.width / 2); + geom.width = (output->area.width / 2); x += woutput->width - geom.width; output->area.width -= geom.width; @@ -517,9 +515,7 @@ ivi_layout_split_committed(struct ivi_surface *surface) break; case IVI_SURFACE_ROLE_SPLIT_H: - if (geom.width == woutput->width && - geom.height == woutput->height) - geom.height = (output->area.height / 2); + geom.height = (output->area.height / 2); y = output->area.y; output->area.y += geom.height;