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

Method remove_child

plugins/tile/tree.cpp:173–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

171}
172
173std::unique_ptr<tree_node_t> split_node_t::remove_child(
174 nonstd::observer_ptr<tree_node_t> child, wf::txn::transaction_uptr& tx)
175{
176 /* Remove child */
177 std::unique_ptr<tree_node_t> result;
178 auto it = this->children.begin();
179
180 while (it != this->children.end())
181 {
182 if (it->get() == child.get())
183 {
184 result = std::move(*it);
185 it = this->children.erase(it);
186 } else
187 {
188 ++it;
189 }
190 }
191
192 /* Remaining children have the full geometry */
193 recalculate_children(this->geometry, tx);
194 result->parent = nullptr;
195
196 return result;
197}
198
199void split_node_t::set_geometry(wf::geometry_t geometry, wf::txn::transaction_uptr& tx)
200{

Callers 2

handle_ipc_set_layoutFunction · 0.45
detach_viewsMethod · 0.45

Calls 3

beginMethod · 0.80
endMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected