I've have found the problem, I think (at least my patch work).
Do to the re-parenting, the menu is not really detected, I think it is done when the menu is attach to the window, but if we re-parent only the top container, the sub container menu, is not detected.
So I remove the menu from the toplevel container, add add it just after.
This patch contains also the empty window problem, and one compile warning fixed (deprecated function used).
I've have found the problem, I think (at least my patch work).
Do to the re-parenting, the menu is not really detected, I think it is done when the menu is attach to the window, but if we re-parent only the top container, the sub container menu, is not detected.
So I remove the menu from the toplevel container, add add it just after.
This patch contains also the empty window problem, and one compile warning fixed (deprecated function used).