summaryrefslogtreecommitdiff
path: root/cursor
AgeCommit message (Collapse)AuthorFilesLines
2016-11-21cursor: Remove "weston" from anonymous shm filenamesDerek Foreman1-1/+1
This mildly confused me during some debugging, so I guess it wouldn't hurt to make the filename more indicative of where it was actually created. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
2016-07-25(multiple): Include stdint.hYong Bakos2-0/+3
Some headers and source files have been using types such as uint32_t without explicitly including stdint.h. Explicitly include stdint.h where appropriate. Signed-off-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2015-06-22cursor: Update printed license from MIT "X11" to MIT "Expat"Bryce Harrington1-22/+30
The code generates a cursor-data.h file, with licensing information. Change this from the MIT "X11" license to MIT "Expat" license for consistency with the rest of Wayland. Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-06-12xcursor: Change keithp licensed code from X11 to Expat licenseBryce Harrington2-32/+38
The license text for this file mentions Keith Packard specifically, however it is otherwise identical to all the other MIT X11 licensed code in Wayland, and so can be changed to the substantially identical MIT Expat license. Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Acked-by: Keith Packard <keithp@keithp.com>
2015-06-12cursor-data.h: Change SuSE licensed code from X11 to ExpatBryce Harrington1-15/+19
The license text for this file mentions SuSE specifically, however it is otherwise identical to all the other MIT X11 licensed code in Wayland, and so can be changed to the substantially identical MIT Expat license. Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Acked-by: Keith Packard <keithp@keithp.com>
2015-06-12cursor: Update boilerplate from MIT X11 license to MIT Expat licenseBryce Harrington5-80/+95
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-05-15remove trailing whitespacesMichael Vetter1-502/+502
Remove trailing whitespaces because they are not needed and jumping to the end of al ine should do just that and not jump to the whitespace.
2015-03-18cursor: free the array from which images are linkedEmmanuel Gil Peyrot1-0/+1
2015-03-05cursor: add wl_cursor_frame_and_durationDerek Foreman2-3/+46
It's useful to know how long the current cursor frame should be displayed so we can wait that long to change it. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-04-01Add error handling for wl_cursorsHardening1-7/+13
This patch adds some error management in wayland cursors Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
2014-03-06build: Move cursor Makefile.am into toplevel Makefile.amKristian Høgsberg1-21/+0
2014-01-15xcursor: don't proceed if XcursorImageCreate failedU. Artie Eoff1-0/+2
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2014-01-15cursor: check for memory allocation errorsU. Artie Eoff1-1/+13
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2014-01-15cursor: free theme->name tooU. Artie Eoff1-0/+1
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2013-12-02cursor: handle running out of buffer spacePekka Paalanen1-16/+51
If posix_fallocate is available, use it to detect when we are running out of buffer space. Propagate the failure properly through the various functions, stopping loading cursors but keeping the cursors that were already successfully loaded. This may result in an animated cursor not having all of its images, or a cursor theme not having all of its cursors. When that happens, the failure is NOT communicated to the application. Instead, the application will get NULL from wl_cursor_theme_get_cursor() for a cursor that was not loaded successfully. If an animated cursor is missing only some images, the animation is truncated but the cursor is still available. This patch relies on the commit "os: use posix_fallocate in creating sharable buffers" for defining HAVE_POSIX_FALLOCATE. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2013-12-02os: use posix_fallocate in creating sharable buffersPekka Paalanen1-1/+18
If posix_fallocate is available, use it instead of ftruncate. Unlike ftruncate, when posix_fallocate succeeds, it guarantees that you cannot run out of disk space, when later writing to the mmap()'ed file. With posix_fallocate, if os_create_anonymous_file() succeeds, the program cannot get a SIGBUS later from accessing this file via mmap. If there is insufficient disk space, the function fails and errno is set to ENOSPC. This is useful on systems, that limit the available buffer space by having XDG_RUNTIME_DIR on a small tmpfs. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2013-10-21wayland: Be consistent about #include-guard namesKristian Høgsberg1-2/+2
We had a mix of inconsistent names, some of which were non-conformant. Standardize on all-uppercase-and-underscore naming convention. https://bugs.freedesktop.org/show_bug.cgi?id=70679
2012-11-27pkgconfig: Use configure provided directoriesQuentin Glidic1-4/+4
https://bugs.freedesktop.org/show_bug.cgi?id=57630
2012-10-19Move ARRAY_LENGTH out of public headersKristian Høgsberg1-0/+2
Exporting unprefixed symbols is a pretty bad idea so don't do that. Instea of redefining it WL_ARRAY_LENGTH, we just move the define to our private header. The scanner generates code that uses ARRAY_LENGTH, but we can just make it count the number elements and emit an integer constant instead.
2012-10-09Ensure cursor_data.c is included in distribution tarballsMatt Roper4-2/+3
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
2012-10-09xcursor: Fix allocation based on string lengthRob Bradford1-1/+1
strlen() doesn't include the terminating NUL. Therefore when allocating a block of memory to hold something equivalent to the length of the string we must increment to take the NUL byte into consideration. Signed-off-by: Rob Bradford <rob@linux.intel.com>
2012-09-10cursor: add cursor.pcf and extraction programPhilipp Brüschweiler2-0/+531
2012-09-10cursor: Add a default cursor themePhilipp Brüschweiler2-1/+618
This theme is loaded when the specified cursor theme can not be found. These cursors are extracted from the xorg sources and transformed into raw ARGB data by a small helper program (commited separately).
2012-08-13Add support for X cursor themes.Christopher Michael1-1/+1
This patch adds a few more directories to search for xcursor themes. Along with the weston patch, this adds the ability to configure weston to use an X11 cursor theme. Previously, wayland cursor would just look in the icons and pixmaps directories for cursor images to load. This adds the ability to also search in the x cursors directory.
2012-07-26Don't skip the first directory entry when reading cursors.Dima Ryazanov1-1/+0
I end up missing the "bottom_right_corner" cursor.
2012-07-10cursor: fix fd leak and a segfaultPekka Paalanen1-0/+6
- don't leak fd in shm_pool_destroy() - return NULL from wl_cursor_theme_load() if pool fails Tha last one fixes a segfault, when shm_pool_create() has failed. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-07-10cursor: use os_create_anonymous_file()Pekka Paalanen4-6/+164
Copy the implementation of os_create_anonymous_file() here from weston, so we can use it instead of hardcoding a path to /tmp. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-07-09wayland-cursor: Add error handling for shm_pool_create()Martin Olsson1-9/+11
2012-06-19wayland-cursor: Plug leak of filename on load_all_cursors_from_dir()Ander Conselvan de Oliveira1-1/+4
2012-06-18Xcursor: Don't ignore unknown file typesDaniel Stone1-1/+2
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-15cursor: Add function for calculating current frame in cursor animationAnder Conselvan de Oliveira2-7/+45
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-08wayland-cursor: add an option that changes the cursor theme directoryAnder Conselvan de Oliveira1-1/+5
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-05-31cursor: Fix warning with objdir != srcdir buildDaniel Stone1-1/+1
Make sure we find the right include paths. krh: Edited to use $(top_builddir) Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-29build: add uninstalled pkg-config filesPekka Paalanen1-0/+8
Required for building apps against wayland libraries that have not been installed. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-05-29cursor: Link libwayland-cursor to libwayland-clientRob Bradford1-1/+1
LDADD is only used when linking programs not libraries. Spotted-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-05-25wayland-cursor: load all cursors from a theme on wl_cursor_theme_loadAnder Conselvan de Oliveira3-53/+145
2012-05-25wayland-cursor: remove enum wl_cursor_typeAnder Conselvan de Oliveira2-39/+3
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-23Wayland: Add missing extern "C"Yan Wang1-0/+8
Add extern "C" macro definition for C++.
2012-05-22cursor: Fix unsigned/signed comparisonsKristian Høgsberg1-3/+3
2012-05-22Introduce libwayland-cursor, a cursor helper libraryAnder Conselvan de Oliveira6-0/+1372
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.