mirror of
https://github.com/labwc/labwc.git
synced 2025-11-05 13:29:58 -05:00
cursor: support XCURSOR_THEME and XCURSOR_SIZE
Use environment variables XCURSOR_THEME and XCURSOR_SIZE to set cursor
theme and size respectively. Default size is 24.
Find icons themes with the command below or similar:
find /usr/share/icons/ -type d -name "cursors"
This commit is contained in:
parent
afa299c080
commit
9eaa5a92a1
2 changed files with 15 additions and 5 deletions
|
|
@ -636,7 +636,11 @@ cursor_frame(struct wl_listener *listener, void *data)
|
|||
void
|
||||
cursor_init(struct seat *seat)
|
||||
{
|
||||
seat->xcursor_manager = wlr_xcursor_manager_create(NULL, 24);
|
||||
const char *xcursor_theme = getenv("XCURSOR_THEME");
|
||||
const char *xcursor_size = getenv("XCURSOR_SIZE");
|
||||
uint32_t size = xcursor_size ? atoi(xcursor_size) : 24;
|
||||
|
||||
seat->xcursor_manager = wlr_xcursor_manager_create(xcursor_theme, size);
|
||||
wlr_xcursor_manager_load(seat->xcursor_manager, 1);
|
||||
|
||||
seat->cursor_motion.notify = cursor_motion;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue