Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

view-impl: add view dummy node when setting the surface root node #2552

Merged
merged 1 commit into from
Dec 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading