I don’t understand what this means.
You can use GtkPopover:autohide
.
Well, for one we can’t move a widget out of process, so we can’t really do that. Since the API is the same, we would not be able to distinguish the case.
From an API perspective, adding widgets is a generic code path; when setting a menu model, we are going to add widgets internally, so we can’t distinguish between a widget that was added by you and one added by a model, unless we make the code more brittle. Then it becomes a case of erroring out with a critical warning if you decide to add a widget to a menu that was populate by a model.
In practice, I think you’re kind of overstating your case. There’s nothing that inherently requires that you use menus and/or menu semantics for your UI outside of a main menu bar. We have widgets like overlays to put complex widgets on top of the content area; and popovers, when you need menu-like behaviour.
In some, niche cases, it may require changing how your code is structured, or changing your UI; it can be problematic or it can be a chance to rethink some of the user experience.
You also don’t need to port to GTK4 right away: GTK3 isn’t going anywhere. Maybe in a couple of years we’re going to have more convenience API that will make your use case easier to port to.