diff options
author | 2023-06-09 11:49:36 +0300 | |
---|---|---|
committer | 2023-06-13 13:58:12 +0300 | |
commit | 07c332f0b8c32976dc3b0ad7f8433de7641e4778 (patch) | |
tree | dfcff947e59a750e6b1feaf8458d42530fc1c74b /src/layout.c | |
parent | 69bd3ddac4b23d827c8e58b96201238f0114497b (diff) |
layout: Add a fallback for reading activation-area
This is a temporary work-around for doing another read of the ini file
for the activation-area in case we detected that we have one set-up but
the activation area is empty. This happens when we're getting the ready()
request from the shell client, when we're initializing the layout.
Bug-AGL: SPEC-4829
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I152e7cba34b74390de2a46df4799c1fb44441d3f
Diffstat (limited to 'src/layout.c')
-rw-r--r-- | src/layout.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/layout.c b/src/layout.c index ea293ca..8c8b4be 100644 --- a/src/layout.c +++ b/src/layout.c @@ -30,6 +30,7 @@ #include <assert.h> #include <string.h> +#include <libweston/config-parser.h> #include <libweston/libweston.h> #include <libweston-desktop/libweston-desktop.h> @@ -155,6 +156,23 @@ void ivi_layout_init(struct ivi_compositor *ivi, struct ivi_output *output) { bool use_default_area = true; + struct weston_config_section *section = output->config; + char *t; + + weston_config_section_get_string(section, "activation-area", &t, NULL); + if (t) { + if (output->area_activation.width == 0 && + output->area_activation.height == 0 && + output->area_activation.x == 0 && + output->area_activation.y == 0) { + weston_log("WARNING: activation-area set in " + "configuration file, but yet applied!\n"); + if (parse_activation_area(t, output) < 0) + weston_log("Invalid activation-area \"%s\" for output %s\n", + t, output->name); + } + } + free(t); ivi_background_init(ivi, output); |