The other benefit of the proposed approach, is that we can trivially use the same mechanism to support proper positioning of tooltips/menus by giving them the subsurface role (I already have a prototype based on this MR that I was hoping to refine and propose).
How would that work when popups and tooltip are extending outside of the bounds of their owner? Does wayland allow subsurface to be larger or outside of their top-level surface?