Commit graph

12 commits

Author SHA1 Message Date
Ander Conselvan de Oliveira
2261007953 wayland-cursor: Plug leak of filename on load_all_cursors_from_dir() 2012-06-19 11:36:31 -04:00
Daniel Stone
61260854ec Xcursor: Don't ignore unknown file types
XFS doesn't return the file type with opendir(), and instead only
returns it when you stat() the file itself.  c66f2602 introduced a check
to ensure that only files and symlinks were loaded, while not checking
for DT_UNKNOWN.  Properly handle DT_UNKNOWN by just proceeding anyway.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-18 15:15:11 -04:00
Ander Conselvan de Oliveira
6b861f7b4d cursor: Add function for calculating current frame in cursor animation
Given a pointer to struct wl_cursor and an elapsed time in ms.,
wl_cursor_frame() will return the index of the cursor image the should
be displayed.
2012-06-15 10:53:58 -04:00
Ander Conselvan de Oliveira
dd8891be36 wayland-cursor: add an option that changes the cursor theme directory
Some distros (e.g. gentoo) install cursor themes in non-standard
directories. Add option --with-icondir to configure.sh that sets the
directory in which to look for cursors.
2012-06-08 12:50:42 -04:00
Daniel Stone
32add9c6e6 cursor: Fix warning with objdir != srcdir build
Make sure we find the right include paths.

krh: Edited to use $(top_builddir)

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31 14:00:41 -04:00
Pekka Paalanen
693e5983f4 build: add uninstalled pkg-config files
Required for building apps against wayland libraries that have not been
installed.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-05-29 10:09:59 -04:00
Rob Bradford
e4efef869e cursor: Link libwayland-cursor to libwayland-client
LDADD is only used when linking programs not libraries.

Spotted-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-05-29 10:07:30 -04:00
Ander Conselvan de Oliveira
c66f26024b wayland-cursor: load all cursors from a theme on wl_cursor_theme_load 2012-05-25 23:06:27 -04:00
Ander Conselvan de Oliveira
f779c57be2 wayland-cursor: remove enum wl_cursor_type
Defining a list of all cursors a theme, client or toolkit should have
is not the purpose of libwayland-cursor. The cursor type enum existed
for making lookups faster, but this kind of optmization belongs in the
toolkits.
2012-05-25 23:06:15 -04:00
Yan Wang
d860f0cbec Wayland: Add missing extern "C"
Add extern "C" macro definition for C++.
2012-05-23 09:32:03 -04:00
Kristian Høgsberg
5030af7635 cursor: Fix unsigned/signed comparisons 2012-05-22 22:41:21 -04:00
Ander Conselvan de Oliveira
775002c6c0 Introduce libwayland-cursor, a cursor helper library
The purpose of this library is to be the equivalent of libXcursor in
the X world. This library is compatible with X cursor themes and loads
them directly into an shm pool making it easy for the clients to get
buffer for each cursor image.

The code for handling the X cursor theme was taken from libXcursor. The
files cursor/xcursor.[ch] are a stripped down version of that library
containing only the interfaces necessary for implementing the wayland
counterpart.
2012-05-22 15:20:13 -04:00