mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-22 05:33:45 -04:00
wayland: use getenv() according to spec
From the NOTES section of getenv(3): The string pointed to by the return value of getenv() may be statically allocated, and can be modified by a subsequent call to getenv()... So, previously xcursor_theme could be modified by libc to contain xcursor_size. This has been fixed by getting xcursor_theme after computing the value of xcursor_size.
This commit is contained in:
parent
2cc0a450b4
commit
fa396cdc33
1 changed files with 2 additions and 1 deletions
|
|
@ -1630,7 +1630,6 @@ wayl_reload_xcursor_theme(struct seat *seat, int new_scale)
|
||||||
seat->pointer.cursor = NULL;
|
seat->pointer.cursor = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *xcursor_theme = getenv("XCURSOR_THEME");
|
|
||||||
int xcursor_size = 24;
|
int xcursor_size = 24;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
@ -1642,6 +1641,8 @@ wayl_reload_xcursor_theme(struct seat *seat, int new_scale)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *xcursor_theme = getenv("XCURSOR_THEME");
|
||||||
|
|
||||||
LOG_INFO("cursor theme: %s, size: %u, scale: %d",
|
LOG_INFO("cursor theme: %s, size: %u, scale: %d",
|
||||||
xcursor_theme, xcursor_size, new_scale);
|
xcursor_theme, xcursor_size, new_scale);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue