[PATCH weston] window: allow changing cursor theme and size

Pekka Paalanen ppaalanen at gmail.com
Wed May 16 00:21:44 PDT 2012


On Tue, 15 May 2012 11:09:36 -0400
Kristian Høgsberg <hoegsberg at gmail.com> wrote:

> On Tue, May 15, 2012 at 09:21:37AM +0300, Pekka Paalanen wrote:
> > On Mon, 14 May 2012 14:39:39 -0400
> > Kristian Høgsberg <krh at bitplanet.net> wrote:
> > 
> > > On Mon, May 14, 2012 at 9:59 AM, Kristian Høgsberg <hoegsberg at gmail.com> wrote:
> > > > On Mon, May 14, 2012 at 02:01:50PM +0300, Pekka Paalanen wrote:
> > > >> Toytoolkit clients will now use two new environment variables:
> > > >>
> > > >> TOYTOOLKIT_CURSOR_THEME=theme
> > > >> TOYTOOLKTI_CURSOR_SIZE=size
> > > >>
> > > >> where 'theme' can be e.g. whiteglass if you have the basic X.Org cursor
> > > >> themes installed. 'size' is a cursor size hint 4-64, by default 32.
> > > >
> > > > Should we make it a weston.ini option instead?
> > > 
> > > On second thought, can you just put this in
> > > /usr/share/icons/default/index.theme:
> > > 
> > > [Icon Theme]
> > > Inherits=whiteglass
> > > 
> > > and have that work?
> > 
> > Hi Kristian,
> > 
> > isn't there a danger of that setting getting into X?
> > Of course, I'd put that somewhere under $HOME where libXcursor also
> > searches in.
> > 
> > Personally I'd like to change cursors in Weston and Weston only,
> > leaving my (host) X server using whatever it happens to be using now.
> > Yes, it makes the cursor change appearance between Weston-on-X and
> > other X apps, but that is what I'd like.
> 
> Yeah, true... I guess the problem that you and other are hitting is
> that you're using the 'core' them, that is, the cursors built-in to
> the X server.  libXcursor special cases those and there are no cursor
> files on disk that we can load for the weston clients.

Yes, it seems so.

> > I didn't make it a weston.ini option, since toytoolkit clients do not
> > use an .ini by default. Or did I miss something?
> 
> Right, we only parse that in the desktop-shell client.  I don't know
> then, maybe we should go back to shipping a cursor theme with weston
> that we can fall back on if loading fails.

That would feel like a step back in cleanups.

When an X11-independent part is split out from libXcursor, maybe it
could grow an API for saying "look for <insert-name-here> theme
configs", and the X11 part would hardcode the current behaviour.

Btw. it seems not all cursor sets have all cursor images, so we'd need
a fallback. Maybe this one fallback cursor could be distributed with
Weston and would replace all cursors in case there is no cursor theme
found at all. Or maybe it should be distributed with the Xcursor non-X11
part.

For Android, I have chosen to revert the libXcursor commit and some
other cursor fixes commits after that, since I don't want to be
building libX11.


Thanks,
pq


More information about the wayland-devel mailing list