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

Bryce Harrington bryce at osg.samsung.com
Thu May 14 17:54:05 PDT 2015


On Thu, May 14, 2015 at 09:36:17AM -0500, Derek Foreman wrote:
> 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?

Yes, we should utilize the .ini more for stuff like this, especially as
we'll be better able to write tests for .ini params than environment
variables.

> > 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

This should also explain what implication of using software cursors is.
Might also be helpful to discuss under what circumstances you'd want to
use this.

> >  .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;
> >  }
> >  
> > 
> 
> _______________________________________________
> 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