summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/compositor.c2
-rw-r--r--src/ivi-compositor.h3
-rw-r--r--src/layout.c18
3 files changed, 22 insertions, 1 deletions
diff --git a/src/compositor.c b/src/compositor.c
index 9b0ac5f..c0a66c8 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -415,7 +415,7 @@ parse_transform(const char *transform, uint32_t *out)
return -1;
}
-static int
+int
parse_activation_area(const char *geometry, struct ivi_output *output)
{
int n;
diff --git a/src/ivi-compositor.h b/src/ivi-compositor.h
index 30b05e3..207fd82 100644
--- a/src/ivi-compositor.h
+++ b/src/ivi-compositor.h
@@ -507,4 +507,7 @@ bool
ivi_surface_count_one(struct ivi_output *ivi_output,
enum ivi_surface_role role);
+int
+parse_activation_area(const char *geometry, struct ivi_output *output);
+
#endif
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);