[PATCH 1/2] exposay: fix infinite loop with fullscreen surfaces
Kristian Høgsberg
hoegsberg at gmail.com
Tue Jan 7 21:50:10 PST 2014
On Tue, Jan 07, 2014 at 04:41:39PM +0100, pochu27 at gmail.com wrote:
> From: Emilio Pozuelo Monfort <emilio.pozuelo at collabora.co.uk>
>
> We were calling exposay_highlight_surface() inside a wl_list_for_each
> loop for a layer, but exposay_highlight_surface() calls activate()
> which calls shell_surface_update_layer(), which removes the surface
> from its layer and reinserts it, causing an infinite loop.
>
> Call exposay_highlight_surface() outside the for_each to avoid this.
That fixes it for me, thanks.
Kristian
> https://bugs.freedesktop.org/show_bug.cgi?id=72404
> ---
> desktop-shell/exposay.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/desktop-shell/exposay.c b/desktop-shell/exposay.c
> index 81da00a..f409aa3 100644
> --- a/desktop-shell/exposay.c
> +++ b/desktop-shell/exposay.c
> @@ -187,7 +187,7 @@ exposay_layout(struct desktop_shell *shell)
> struct weston_compositor *compositor = shell->compositor;
> struct weston_output *output = get_default_output(compositor);
> struct weston_view *view;
> - struct exposay_surface *esurface;
> + struct exposay_surface *esurface, *highlight = NULL;
> int w, h;
> int i;
> int last_row_removed = 0;
> @@ -284,13 +284,16 @@ exposay_layout(struct desktop_shell *shell)
> esurface->height = view->surface->height * esurface->scale;
>
> if (shell->exposay.focus_current == esurface->view)
> - exposay_highlight_surface(shell, esurface);
> + highlight = esurface;
>
> exposay_animate_in(esurface);
>
> i++;
> }
>
> + if (highlight)
> + exposay_highlight_surface(shell, highlight);
> +
> weston_compositor_schedule_repaint(shell->compositor);
>
> return EXPOSAY_LAYOUT_ANIMATE_TO_OVERVIEW;
> --
> 1.8.5.2
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list