desktop-shell: update for manual surface/view mapping

This is a follow up for desktop-shell to manually
set mapped status for views/surfaces it controls

v2:

- Add manual mapping to shell_fade_create_surface()
  and shell_ensure_fullscreen_black_view()

Signed-off-by: Armin Krezović <krezovic.armin@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
dev
Armin Krezović 8 years ago committed by Pekka Paalanen
parent f8486c33b4
commit 4663aca2e2
  1. 2
      desktop-shell/input-panel.c
  2. 13
      desktop-shell/shell.c

@ -85,6 +85,8 @@ show_input_panel_surface(struct input_panel_surface *ipsurf)
&ipsurf->view->layer_link); &ipsurf->view->layer_link);
weston_view_geometry_dirty(ipsurf->view); weston_view_geometry_dirty(ipsurf->view);
weston_view_update_transform(ipsurf->view); weston_view_update_transform(ipsurf->view);
ipsurf->surface->is_mapped = true;
ipsurf->view->is_mapped = true;
weston_surface_damage(ipsurf->surface); weston_surface_damage(ipsurf->surface);
if (ipsurf->anim) if (ipsurf->anim)

@ -749,6 +749,7 @@ create_focus_surface(struct weston_compositor *ec,
surface->configure = focus_surface_configure; surface->configure = focus_surface_configure;
surface->output = output; surface->output = output;
surface->is_mapped = true;
surface->configure_private = fsurf; surface->configure_private = fsurf;
weston_surface_set_label_func(surface, focus_surface_get_label); weston_surface_set_label_func(surface, focus_surface_get_label);
@ -759,6 +760,7 @@ create_focus_surface(struct weston_compositor *ec,
return NULL; return NULL;
} }
fsurf->view->output = output; fsurf->view->output = output;
fsurf->view->is_mapped = true;
weston_surface_set_size(surface, output->width, output->height); weston_surface_set_size(surface, output->width, output->height);
weston_view_set_position(fsurf->view, output->x, output->y); weston_view_set_position(fsurf->view, output->x, output->y);
@ -2854,6 +2856,7 @@ shell_ensure_fullscreen_black_view(struct shell_surface *shsurf)
weston_view_geometry_dirty(shsurf->fullscreen.black_view); weston_view_geometry_dirty(shsurf->fullscreen.black_view);
weston_surface_damage(shsurf->surface); weston_surface_damage(shsurf->surface);
shsurf->fullscreen.black_view->is_mapped = true;
shsurf->state.lowered = false; shsurf->state.lowered = false;
} }
@ -3523,11 +3526,13 @@ shell_map_popup(struct shell_surface *shsurf)
struct weston_touch *touch = weston_seat_get_touch(shseat->seat); struct weston_touch *touch = weston_seat_get_touch(shseat->seat);
shsurf->surface->output = parent_view->output; shsurf->surface->output = parent_view->output;
shsurf->surface->is_mapped = true;
shsurf->view->output = parent_view->output; shsurf->view->output = parent_view->output;
weston_view_set_transform_parent(shsurf->view, parent_view); weston_view_set_transform_parent(shsurf->view, parent_view);
weston_view_set_position(shsurf->view, shsurf->popup.x, shsurf->popup.y); weston_view_set_position(shsurf->view, shsurf->popup.x, shsurf->popup.y);
weston_view_update_transform(shsurf->view); weston_view_update_transform(shsurf->view);
shsurf->view->is_mapped = true;
if (pointer && if (pointer &&
pointer->grab_serial == shsurf->popup.serial) { pointer->grab_serial == shsurf->popup.serial) {
@ -4361,6 +4366,8 @@ configure_static_view(struct weston_view *ev, struct weston_layer *layer)
} }
weston_view_set_position(ev, ev->output->x, ev->output->y); weston_view_set_position(ev, ev->output->x, ev->output->y);
ev->surface->is_mapped = true;
ev->is_mapped = true;
if (wl_list_empty(&ev->layer_link.link)) { if (wl_list_empty(&ev->layer_link.link)) {
weston_layer_entry_insert(&layer->view_list, &ev->layer_link); weston_layer_entry_insert(&layer->view_list, &ev->layer_link);
@ -4542,6 +4549,8 @@ lock_surface_configure(struct weston_surface *surface, int32_t sx, int32_t sy)
weston_layer_entry_insert(&shell->lock_layer.view_list, weston_layer_entry_insert(&shell->lock_layer.view_list,
&view->layer_link); &view->layer_link);
weston_view_update_transform(view); weston_view_update_transform(view);
surface->is_mapped = true;
view->is_mapped = true;
shell_fade(shell, FADE_IN); shell_fade(shell, FADE_IN);
} }
} }
@ -5380,6 +5389,8 @@ shell_fade_create_surface(struct desktop_shell *shell)
weston_layer_entry_insert(&compositor->fade_layer.view_list, weston_layer_entry_insert(&compositor->fade_layer.view_list,
&view->layer_link); &view->layer_link);
pixman_region32_init(&surface->input); pixman_region32_init(&surface->input);
surface->is_mapped = true;
view->is_mapped = true;
return view; return view;
} }
@ -5686,6 +5697,7 @@ map(struct desktop_shell *shell, struct shell_surface *shsurf,
if (shsurf->type != SHELL_SURFACE_NONE) { if (shsurf->type != SHELL_SURFACE_NONE) {
weston_view_update_transform(shsurf->view); weston_view_update_transform(shsurf->view);
shsurf->view->is_mapped = true;
if (shsurf->state.maximized) { if (shsurf->state.maximized) {
shsurf->surface->output = shsurf->output; shsurf->surface->output = shsurf->output;
shsurf->view->output = shsurf->output; shsurf->view->output = shsurf->output;
@ -5797,6 +5809,7 @@ shell_surface_configure(struct weston_surface *es, int32_t sx, int32_t sy)
if (!weston_surface_is_mapped(es)) { if (!weston_surface_is_mapped(es)) {
map(shell, shsurf, sx, sy); map(shell, shsurf, sx, sy);
es->is_mapped = true;
} else if (type_changed || sx != 0 || sy != 0 || } else if (type_changed || sx != 0 || sy != 0 ||
shsurf->last_width != es->width || shsurf->last_width != es->width ||
shsurf->last_height != es->height) { shsurf->last_height != es->height) {

Loading…
Cancel
Save