Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
- index ef63edcb..15c2fe42 100644
- --- a/desktop-shell/shell.c
- +++ b/desktop-shell/shell.c
- @@ -1929,6 +1929,15 @@ shell_surface_update_child_surface_layers (struct shell_surface *shsurf)
- weston_desktop_surface_propagate_layer(shsurf->desktop_surface);
- }
- +static void
- +wl_list_prepend(struct wl_list *list, struct wl_list *elm)
- +{
- + elm->prev = list->prev;
- + elm->next = list;
- + list->prev = elm;
- + elm->prev->next = elm;
- +}
- +
- /* Update the surface’s layer. Mark both the old and new views as having dirty
- * geometry to ensure the changes are redrawn.
- *
- @@ -1940,6 +1949,7 @@ shell_surface_update_layer(struct shell_surface *shsurf)
- struct weston_surface *surface =
- weston_desktop_surface_get_surface(shsurf->desktop_surface);
- struct weston_layer_entry *new_layer_link;
- + const char *app_id;
- new_layer_link = shell_surface_calculate_layer_link(shsurf);
- @@ -1948,9 +1958,30 @@ shell_surface_update_layer(struct shell_surface *shsurf)
- if (new_layer_link == &shsurf->view->layer_link)
- return;
- + app_id = weston_desktop_surface_get_app_id(shsurf->desktop_surface);
- +
- weston_view_geometry_dirty(shsurf->view);
- weston_layer_entry_remove(&shsurf->view->layer_link);
- - weston_layer_entry_insert(new_layer_link, &shsurf->view->layer_link);
- +
- + /* Prepend video output surface to keep it below other surfaces. */
- + if ((app_id != NULL) && !strcmp("video-output", app_id)) {
- + struct weston_layer_entry *list = new_layer_link;
- + struct weston_layer_entry *entry = &shsurf->view->layer_link;
- +
- + const char *t = weston_desktop_surface_get_title(shsurf->desktop_surface);
- +
- + weston_log(
- + "prepending instead of appending surface for "
- + "application with title \"%s\"\n",
- + (t == NULL) ? "<no title>" : t
- + );
- +
- + wl_list_prepend(&list->link, &entry->link);
- +
- + entry->layer = list->layer;
- + } else
- + weston_layer_entry_insert(new_layer_link, &shsurf->view->layer_link);
- +
- weston_view_geometry_dirty(shsurf->view);
- weston_surface_damage(surface);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement