[PATCH] compositor-drm: Add environment variable, WESTON_FORCE_SW_CURSORS to force software cursors

Derek Foreman derekf at osg.samsung.com
Thu May 14 07:36:17 PDT 2015


On 13/05/15 09:25 PM, nerdopolis wrote:
> For some video cards, hardware rendered cursors fail to change properly.
> 
> Add a variable that users can use for these cards when starting Weston.

Why an env var and not a weston.ini option?  I don't think this is a bad
idea, but I think it'd be better done in the ini file?


> Also document in the man page
> 
> This time with all the closing parenthesis, and the correct commit message.
> ---
>  man/weston.man       | 4 ++++
>  src/compositor-drm.c | 5 ++++-
>  2 files changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/man/weston.man b/man/weston.man
> index c5dc2f2..fd12938 100644
> --- a/man/weston.man
> +++ b/man/weston.man
> @@ -267,6 +267,10 @@ This allows launching Weston as a nested server.
>  For Wayland clients, holds the file descriptor of an open local socket
>  to a Wayland server.
>  .TP
> +.B WESTON_FORCE_SW_CURSORS
> +Set this variable to force Weston to use software cursors when under the 
> +compositor-drm backend
> +.TP
>  .B WESTON_CONFIG_FILE
>  Weston sets this variable to the absolute path of the configuration file
>  it loads, or to the empty string if no file is used. Programs that use
> diff --git a/src/compositor-drm.c b/src/compositor-drm.c
> index 0cdb8f4..4e5e2fc 100644
> --- a/src/compositor-drm.c
> +++ b/src/compositor-drm.c
> @@ -1641,7 +1641,10 @@ drm_output_init_egl(struct drm_output *output, struct drm_compositor *ec)
>  		weston_log("cursor buffers unavailable, using gl cursors\n");
>  		ec->cursors_are_broken = 1;
>  	}
> -
> +	if (getenv("WESTON_FORCE_SW_CURSORS"))
> +	{
> +		ec->cursors_are_broken = 1;
> +	}
>  	return 0;
>  }
>  
> 



More information about the wayland-devel mailing list