On Wed,  5 Nov 2014 13:26:57 -0600
Derek Foreman <[email protected]> wrote:

> Signed-off-by: Derek Foreman <[email protected]>
> ---
>  src/compositor.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/src/compositor.c b/src/compositor.c
> index 1f6700d..9dcabe3 100644
> --- a/src/compositor.c
> +++ b/src/compositor.c
> @@ -105,6 +105,7 @@ static void weston_mode_switch_finish(struct 
> weston_output *output,
>       struct weston_seat *seat;
>       struct wl_resource *resource;
>       pixman_region32_t old_output_region;
> +     int version;
>  
>       pixman_region32_init(&old_output_region);
>       pixman_region32_copy(&old_output_region, &output->region);
> @@ -157,11 +158,12 @@ static void weston_mode_switch_finish(struct 
> weston_output *output,
>                                           output->current_mode->refresh);
>               }
>  
> -             if (scale_changed)
> +             version = wl_resource_get_version(resource);
> +             if (version >= WL_OUTPUT_SCALE_SINCE_VERSION && scale_changed)
>                       wl_output_send_scale(resource, output->current_scale);
>  
> -             if (wl_resource_get_version(resource) >= 2)
> -                        wl_output_send_done(resource);
> +             if (version >= WL_OUTPUT_DONE_SINCE_VERSION)
> +                     wl_output_send_done(resource);
>       }
>  }
>  

Pushed!

Hmm, now that I look at it, yet another thing I think might need
fixing. wl_output_done gets sent even if neither scale nor mode
changed. That means weston_output_mode_switch_to_temporary() ends up
sending spurious done-events. Do I read right?

Please? :-)


Thanks,
pq
_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to