rcxml: validate total osd field width

Before this patch, window switcher fields could overflow if the sum of
<windowSwitcher><fields><field width=""> exceeds 100%.
This commit is contained in:
tokyo4j 2025-05-03 20:58:39 +09:00 committed by Hiroaki Yamamoto
parent 706f7bc03c
commit cb58156904
3 changed files with 5 additions and 3 deletions

View file

@ -352,7 +352,7 @@ osd_field_arg_from_xml_node(struct window_switcher_field *field,
}
bool
osd_field_validate(struct window_switcher_field *field)
osd_field_is_valid(struct window_switcher_field *field)
{
if (field->content == LAB_FIELD_NONE) {
wlr_log(WLR_ERROR, "Invalid OSD field: no content set");