>And that is where positioning is necessary: to not occlude the line of text where the cursor is, and to show the documentation at a sensible place (near the cursor position).
xdg-foreign will just get that window on top. You don't have any control of where on top it is, merely a child-parent relationship It will occlude or be nowhere near the cursor. xdg-foreign alone won't be a complete solution. David