]> git.mdlowis.com Git - proto/labwc.git/commit
rcxml: fix broken OSD layout with multiple <fields> entries
authortokyo4j <hrak1529@gmail.com>
Sat, 12 Apr 2025 11:51:02 +0000 (20:51 +0900)
committerJohan Malm <johanmalm@users.noreply.github.com>
Sat, 12 Apr 2025 20:27:41 +0000 (21:27 +0100)
commit96a3a576a9547cb177ad28a158f6ac63283a421b
treeab7b296372ff21aeda991a225a2f99737bcb20b0
parentfcf230e692a2a060102440a5d93265d76378489f
rcxml: fix broken OSD layout with multiple <fields> entries

Before this commit, all <field> entries inside different <fields> entires
were inserted to the same list. Suppose we have following configuration:

  <windowSwitcher>
    <fields><field content="title" width="100%" /></fields>
  </windowSwitcher>
  <windowSwitcher>
    <fields><field content="identifier" width="100%" /></fields>
  </windowSwitcher>

In this case, both two <field> entries were inserted to
rc.window_switcher.fields, making the OSD content overflow.

This commit fixes by clearing rc.window_switcher.fields when the parser
encounters <windowSwitcher><fields>.
src/config/rcxml.c