MCPcopy Create free account
hub / github.com/WayfireWM/wayfire / base_initialization

Method base_initialization

src/view/view.cpp:172–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170};
171
172void wf::view_interface_t::base_initialization()
173{
174 priv->root_node = std::make_shared<view_root_node_t>(this);
175 priv->transformed_node = std::make_shared<scene::transform_manager_node_t>();
176 priv->root_node->set_children_list({priv->transformed_node});
177 priv->root_node->set_enabled(false);
178
179 priv->pre_free = [=] (auto)
180 {
181 this->_clear_data();
182 if (auto self = dynamic_cast<toplevel_view_interface_t*>(this))
183 {
184 auto children = self->children;
185 for (auto ch : children)
186 {
187 ch->set_toplevel_parent(nullptr);
188 }
189 }
190 };
191
192 this->connect(&priv->pre_free);
193}
194
195wf::view_interface_t::~view_interface_t()
196{

Callers 1

createMethod · 0.80

Calls 5

set_children_listMethod · 0.80
_clear_dataMethod · 0.80
set_toplevel_parentMethod · 0.80
connectMethod · 0.80
set_enabledMethod · 0.45

Tested by

no test coverage detected