wm: keep child views in front of their parent

When restacking a top-level view, execute the top-level restacking
before updating the child views. Otherwise, child views may wrongly
refer to the old stacking position of the top-level view.

Issue #5242
This commit is contained in:
Norman Feske 2024-09-16 11:37:09 +02:00
parent e5437563e2
commit 5993fa9c7f

View File

@ -180,12 +180,13 @@ struct Wm::Decorator_gui_session : Session_object<Gui::Session>,
case Command::FRONT_OF:
case Command::BEHIND_OF:
_real_gui.enqueue(cmd);
_content_view_ids.apply<Content_view_ref const>(cmd.front.view,
[&] (Content_view_ref const &view_ref) {
_real_gui.execute();
_content_callback.update_content_child_views(view_ref.win_id); },
[&] { });
_real_gui.enqueue(cmd);
return;
case Command::TITLE: