awesome/common
Uli Schlachter ec3901a81e Rewrite the xcursor caching code
Previously, the cache for xcursors consisted of a static array. We had a
hardcoded list of supported cursor names and each one got assigned a
position in this array. This hardcoded list means that one cannot simply
use whatever cursor a cursor theme happens to provide, since the name
needs to be in our list.

In this commit, the code is rewritten. Instead of a hardcoded list, a
sorted array is now used as the cache, as provided by the BARRAY code
from common/util.h. The array is sorted by the name of the cursor.

This change implies an API change for the xcursor code. Previously, one
had to first translate a cursor name into a cache index
(xcursor_font_fromstr()) and could then use this to actually get the
cursor (xcursor_new()). With this commit, xcursor_new() is the only
function provided by the cursor code and it directly gets a string as
argument.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2022-12-04 08:55:46 +01:00
..
array.h Deprecate signal_add() on C-API objects 2016-06-04 17:51:45 +02:00
atoms.c remove encoding=utf-8 from modelines 2011-09-11 17:34:09 +02:00
atoms.h remove encoding=utf-8 from modelines 2011-09-11 17:34:09 +02:00
atoms.list Implement INCR transfers 2019-02-07 17:56:26 +01:00
backtrace.c remove encoding=utf-8 from modelines 2011-09-11 17:34:09 +02:00
backtrace.h remove encoding=utf-8 from modelines 2011-09-11 17:34:09 +02:00
buffer.c Add missing va_end()s to buffer_addvf() 2017-11-17 10:23:11 +01:00
buffer.h Add a vim modeline to all C source 2015-12-12 17:42:16 +01:00
luaclass.c capi: Move from `.data` to `._private` for the property data. 2019-11-09 16:43:12 -05:00
luaclass.h Deprecate signal_add() on C-API objects 2016-06-04 17:51:45 +02:00
lualib.c Move variable declarations from header to C file to fix build with GCC 10 2020-04-17 19:25:40 +02:00
lualib.h Move variable declarations from header to C file to fix build with GCC 10 2020-04-17 19:25:40 +02:00
luaobject.c Use signal_array_getbyname() where appropriate 2018-01-24 09:13:35 +01:00
luaobject.h C: Add a .data table to all C objects 2016-09-30 11:07:55 +02:00
signal.h Use signal_array_getbyname() where appropriate 2018-01-24 09:13:35 +01:00
util.c Add timestamps to messages on stderr (#602) 2015-12-31 15:38:17 +01:00
util.h Add & use a non-fatal kind of assert() (#1779) 2017-05-13 23:22:15 +02:00
version.c cmd: Add more info to --version. 2020-02-08 17:18:01 -05:00
version.h init: Add an API level concept to `capi`. 2020-02-08 17:18:01 -05:00
xcursor.c Rewrite the xcursor caching code 2022-12-04 08:55:46 +01:00
xcursor.h Rewrite the xcursor caching code 2022-12-04 08:55:46 +01:00
xembed.c xembed: Stop using XCB_CURRENT_TIME 2017-04-15 12:04:57 +02:00
xembed.h xembed: Stop using XCB_CURRENT_TIME 2017-04-15 12:04:57 +02:00
xutil.c Remove some unused fields from globalconf 2015-12-22 17:25:45 +01:00
xutil.h Make sure we always flush after xcb_ungrab_server() 2019-02-27 10:20:22 +01:00