mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-25 14:57:20 +00:00
[client] wayland: respect XCURSOR_THEME and XCURSOR_SIZE env variables
This commit is contained in:
parent
d35c448058
commit
2dd1ad53f8
@ -142,7 +142,18 @@ bool waylandCursorInit(void)
|
|||||||
wl_surface_commit(wlWm.cursors[LG_POINTER_SQUARE]);
|
wl_surface_commit(wlWm.cursors[LG_POINTER_SQUARE]);
|
||||||
}
|
}
|
||||||
|
|
||||||
wlWm.cursorTheme = wl_cursor_theme_load(NULL, 24, wlWm.shm);
|
const char * cursorTheme = getenv("XCURSOR_THEME");
|
||||||
|
const char * cursorSizeEnv = getenv("XCURSOR_SIZE");
|
||||||
|
int cursorSize = 24;
|
||||||
|
|
||||||
|
if (cursorSizeEnv)
|
||||||
|
{
|
||||||
|
int size = atoi(cursorSizeEnv);
|
||||||
|
if (size)
|
||||||
|
cursorSize = size;
|
||||||
|
}
|
||||||
|
|
||||||
|
wlWm.cursorTheme = wl_cursor_theme_load(cursorTheme, cursorSize, wlWm.shm);
|
||||||
if (wlWm.cursorTheme)
|
if (wlWm.cursorTheme)
|
||||||
for (LG_DSPointer pointer = LG_POINTER_ARROW; pointer < LG_POINTER_COUNT; ++pointer)
|
for (LG_DSPointer pointer = LG_POINTER_ARROW; pointer < LG_POINTER_COUNT; ++pointer)
|
||||||
for (const char ** names = nameLists[pointer]; *names; ++names)
|
for (const char ** names = nameLists[pointer]; *names; ++names)
|
||||||
|
Loading…
Reference in New Issue
Block a user