[PATCH weston] drm: Don't use the cursor overlay if the scale doesn't match

Kristian Høgsberg hoegsberg at gmail.com
Thu May 1 13:48:45 PDT 2014


On Thu, May 01, 2014 at 06:00:41PM +0100, Neil Roberts wrote:
> If the scale for the cursor surface doesn't match that of the output
> then we shouldn't use the cursor overlay because otherwise it will be
> drawn at the wrong size. This problem is particularly noticable with
> multiple pointers because it randomly alternates between drawing one
> cursor or the other at a larger size depending on which one gets put
> in the cursor overlay.

Thanks, applied.

Kristian

> ---
>  src/compositor-drm.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/src/compositor-drm.c b/src/compositor-drm.c
> index 9d293bc..4441308 100644
> --- a/src/compositor-drm.c
> +++ b/src/compositor-drm.c
> @@ -953,12 +953,15 @@ drm_output_prepare_cursor_view(struct weston_output *output_base,
>  {
>  	struct drm_compositor *c =
>  		(struct drm_compositor *) output_base->compositor;
> +	struct weston_buffer_viewport *viewport = &ev->surface->buffer_viewport;
>  	struct drm_output *output = (struct drm_output *) output_base;
>  
>  	if (c->gbm == NULL)
>  		return NULL;
>  	if (output->base.transform != WL_OUTPUT_TRANSFORM_NORMAL)
>  		return NULL;
> +	if (viewport->buffer.scale != output_base->current_scale)
> +		return NULL;
>  	if (output->cursor_view)
>  		return NULL;
>  	if (ev->output_mask != (1u << output_base->id))
> -- 
> 1.9.0
> 
> _______________________________________________
> 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