return -1;
}
+static int
+parse_activation_area(const char *geometry, struct ivi_output *output)
+{
+ int n;
+ unsigned width, height, x, y;
+
+ n = sscanf(geometry, "%ux%u+%u,%u", &width, &height, &x, &y);
+ if (n != 4) {
+ return -1;
+ }
+ output->area_activation.width = width;
+ output->area_activation.height = height;
+ output->area_activation.x = x;
+ output->area_activation.y = y;
+ return 0;
+}
+
static int
configure_output(struct ivi_output *output)
{
if (parse_transform(t, &transform) < 0)
weston_log("Invalid transform \"%s\" for output %s\n",
t, output->name);
+ weston_config_section_get_string(section, "activation-area", &t, "");
+ if (parse_activation_area(t, output) < 0)
+ weston_log("Invalid activation-area \"%s\" for output %s\n",
+ t, output->name);
free(t);
}
weston_head_detach(head);
if (count_heads(ivi_output->output) == 0) {
- weston_output_disable(ivi_output->output);
+ if (ivi_output->output) {
+ /* ivi_output->output destruction may be deferred in
+ * some cases (see drm_output_destroy()), so we need to
+ * forcibly trigger the destruction callback now, or
+ * otherwise would later access data that we are about
+ * to free
+ */
+ struct weston_output *save = ivi_output->output;
+
+ handle_output_destroy(&ivi_output->output_destroy, save);
+ weston_output_destroy(save);
+ }
}
+ wl_list_remove(&ivi_output->link);
+ free(ivi_output);
}
static struct weston_config_section *
weston_compositor_wake(ivi.compositor);
ivi_shell_create_global(&ivi);
- ivi_launch_shell_client(&ivi);
+
+ ivi_launch_shell_client(&ivi, "shell-client",
+ &ivi.shell_client.client);
+ ivi_launch_shell_client(&ivi, "shell-client-ext",
+ &ivi.shell_client_ext.client);
+
if (debug)
ivi_screenshooter_create(&ivi);
ivi_agl_systemd_notify(&ivi);