Skip to content

Commit

Permalink
view-impl: add view dummy node when setting the surface root node (#2552
Browse files Browse the repository at this point in the history
)
  • Loading branch information
ammen99 authored Dec 27, 2024
1 parent fdadd85 commit 78ef488
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/view/view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,11 @@ void wf::view_interface_t::set_surface_root_node(scene::floating_inner_ptr surfa
priv->dummy_node = std::make_shared<sentinel_node_t>();
this->priv->surface_root_node = surface_root_node;

// Plugins may want to add subsurfaces even before the view is mapped for the first time.
// This is why we add a dummy node to track the position of the main surface in the order of surfaces
// even before mapping the view for the first time.
wf::scene::add_front(surface_root_node, priv->dummy_node);

// Set up view content to scene.
priv->transformed_node->set_children_list({surface_root_node});
}
Expand Down

0 comments on commit 78ef488

Please sign in to comment.