[PATCH weston] compositor: Schedule repaint after assigning output.

Kristian Høgsberg hoegsberg at gmail.com
Tue Aug 14 07:09:30 PDT 2012


On Tue, Aug 14, 2012 at 03:51:40AM -0600, Scott Moreau wrote:
> This fixes a bug exposed by 982387011ff where tooltips were not drawn while
> the compositor is idle until the next output repaint.
> ---
> 
> Just schedule a repaint instead of preemptively calling weston_surface_update_transform().

This isn't right either.  We don't want to schedule a full repaint
whenever we go through weston_surface_assign_output().  I think when
we started using weston_surface_schedule_repaint() instead of
weston_compositor_schedule_repaint() in a few places, we changed
weston_surface_damage() to not schedule repaints when the surface
isn't visible.

So the bug is that there are still a few places that rely on that
behaviour and we need to fix those to call
weston_compositor_schedule_repaint() instead of
weston_surface_damage().  I was thinking that shell.c map() was guilty
of that, but it does call assign output, and the client then later
calls wl_surface.damage, which calls weston_surface_damage(), which
(with an output now assigned) will schedule the repaint.  Not sure..

Kristian

> 
>  src/compositor.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/compositor.c b/src/compositor.c
> index 7370435..c1cbdd5 100644
> --- a/src/compositor.c
> +++ b/src/compositor.c
> @@ -1404,6 +1404,7 @@ weston_surface_assign_output(struct weston_surface *es)
>  
>  	es->output = new_output;
>  	weston_surface_update_output_mask(es, mask);
> +	weston_compositor_schedule_repaint(ec);
>  }
>  
>  static void
> -- 
> 1.7.11.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