[Spice-devel] [PATCH xf86-qxl] drm: restore cursor after resolution change

Alon Levy alevy at redhat.com
Mon Jul 7 06:56:35 PDT 2014


On 07/02/2014 01:22 PM, Marc-André Lureau wrote:
> From: Marc-André Lureau <marcandre.lureau at gmail.com>
> 
> The Spice server & qemu reset the cursor state when
> changing resolution. Although X does restore the
> cursor on framebuffer changes, it doesn't for crtc
> config. Restoring the cursor here is the simplest
> way to solve the "invisible cursor" after resolution
> change bug with DRM driver.

ACK.

> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1030531
> ---
>  src/qxl_drmmode.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/src/qxl_drmmode.c b/src/qxl_drmmode.c
> index af4b22d..f9eca5f 100644
> --- a/src/qxl_drmmode.c
> +++ b/src/qxl_drmmode.c
> @@ -47,6 +47,9 @@
>  
>  #include "qxl.h"
>  #include "qxl_surface.h"
> +
> +static void drmmode_show_cursor (xf86CrtcPtr crtc);
> +
>  static void
>  drmmode_ConvertFromKMode(ScrnInfoPtr	scrn,
>  		     drmModeModeInfo *kmode,
> @@ -248,6 +251,10 @@ done:
>  		crtc->active = TRUE;
>  #endif
>  
> +        CursorPtr cursor = xf86_config->cursor;
> +        if (cursor)
> +            drmmode_show_cursor(crtc);
> +
>  	return ret;
>  }
>  
> 



More information about the Spice-devel mailing list