Centralize retained panel popup attachment

This commit is contained in:
2026-06-06 10:46:29 +02:00
parent 5ff2992c0e
commit ab36af0a8f
9 changed files with 49 additions and 14 deletions

View File

@@ -32,6 +32,23 @@ pp::foundation::Status attach_legacy_overlay_node(
return pp::foundation::Status::success();
}
pp::foundation::Status attach_legacy_overlay_node_to_root(
Node& anchor,
const std::shared_ptr<Node>& node) noexcept
{
if (!node) {
return pp::foundation::Status::invalid_argument("legacy overlay node is null");
}
auto* root = anchor.root();
if (!root) {
return pp::foundation::Status::invalid_argument("legacy overlay root is missing");
}
root->add_child(node);
return pp::foundation::Status::success();
}
pp::foundation::Result<std::shared_ptr<NodePopupMenu>> add_legacy_popup_menu(
App& app,
const char* template_id,