X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Flayout.c;h=5576094e8e761bde077f061d3a6bbc8c3017967a;hb=26700fa20abefccb77bb586b49b1629bf102e131;hp=a5e3b36208b90996ceb3778497f5aea0c2db5c28;hpb=456f3fed4ff45bbaf7f60c78ffb0ae0289002dfe;p=src%2Fagl-compositor.git diff --git a/src/layout.c b/src/layout.c index a5e3b36..5576094 100644 --- a/src/layout.c +++ b/src/layout.c @@ -30,6 +30,7 @@ #include #include +#include #include #include @@ -155,6 +156,29 @@ 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); + } else { + weston_log("WARNING: activation-area detected in ini file, " + "but agl_shell override detected!\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); @@ -430,8 +454,10 @@ ivi_layout_add_to_hidden_layer(struct ivi_surface *surf, if (surf->hidden_layer_output && surf->hidden_layer_output != ivi_output) { weston_layer_entry_remove(&ev->layer_link); + weston_view_geometry_dirty(ev); + weston_surface_damage(ev->surface); - if (ivi_output->area.width != surf->hidden_layer_output->area.width && + if (ivi_output->area.width != surf->hidden_layer_output->area.width || ivi_output->area.height != surf->hidden_layer_output->area.height) { weston_desktop_surface_set_maximized(dsurf, true); weston_desktop_surface_set_size(dsurf, @@ -555,9 +581,12 @@ ivi_layout_desktop_committed(struct ivi_surface *surf) return; } - if (!surf->ivi->activate_by_default) { - weston_log("Refusing to activate surface role %d, app_id %s\n", - surf->role, app_id); + if (!surf->ivi->activate_by_default && + (!surf->xwayland.is_set && !is_shell_surface_xwayland(surf))) { + weston_log("Refusing to activate surface role %d, app_id %s, type %s\n", + surf->role, app_id, + is_shell_surface_xwayland(surf) ? + "xwayland" : "regular"); if (!weston_desktop_surface_get_maximized(dsurf) || geom.width != r_output->area.width || @@ -585,7 +614,12 @@ ivi_layout_desktop_committed(struct ivi_surface *surf) */ weston_log("Surface no app_id, role %s activating by default\n", ivi_layout_get_surface_role_name(surf)); - ivi_layout_activate_by_surf(r_output, surf); + if (surf->xwayland.is_set || is_shell_surface_xwayland(surf)) { + ivi_layout_activate_by_surf(r_output, surf); + ivi_layout_activate_complete(r_output, surf); + } else { + ivi_layout_activate_by_surf(r_output, surf); + } } } @@ -1114,7 +1148,8 @@ ivi_layout_deactivate(struct ivi_compositor *ivi, const char *app_id) weston_log("Deactiving %s, role %s\n", app_id, ivi_layout_get_surface_role_name(surf)); - if (surf->role == IVI_SURFACE_ROLE_DESKTOP) { + if (surf->role == IVI_SURFACE_ROLE_DESKTOP || + surf->role == IVI_SURFACE_ROLE_REMOTE) { struct ivi_surface *previous_active; previous_active = ivi_output->previous_active;