[PATCH] window: use libXcursor for loading pointer images

Kristian Høgsberg krh at bitplanet.net
Thu May 3 10:39:38 PDT 2012


On Thu, May 3, 2012 at 12:32 PM, Bill Spitzak <spitzak at gmail.com> wrote:
> I would use this program to dump all the cursors as .png files and then make
> Wayland clients read those. Even if C code was written to read the X11
> cursors it would still read them from X11 locations, it would be nice if
> Wayland existed and worked without any X11 at all.

Bill, please do a little research before you post.  libXcursor reads
cursor images and hotspots as well as mulitple frames for animated
cursors from the Xcursor format.  If we just used png, we'd need a new
format to provide that info.  libXcursor It reads it from non-X
locations, eg (strace output):

open("/home/krh/.icons/default/cursors/bottom_left_corner", O_RDONLY)
= -1 ENOENT (No such file or directory)
open("/home/krh/.icons/default/index.theme", O_RDONLY) = -1 ENOENT (No
such file or directory)
...
open("/usr/share/icons/Adwaita/cursors/bottom_left_corner", O_RDONLY) = 6

etc.  Obviously we don't want a hard libX11 dependency in weston, but
we could make a libwlcursor library that's just libXcursor with the
Xrender part split out.

Kristian


>
>
> On 05/03/2012 08:43 AM, Kristian Høgsberg wrote:
>>
>> We now also have a hard dependency on libX11 in weston through
>> libXcursor - something we need to figure out how to deal with.
>
> _______________________________________________
> 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