From 5993fa9c7fa67ec400bcbc5c5d82ddb6442785ca Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Mon, 16 Sep 2024 11:37:09 +0200 Subject: [PATCH] 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 --- repos/gems/src/server/wm/decorator_gui.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/repos/gems/src/server/wm/decorator_gui.h b/repos/gems/src/server/wm/decorator_gui.h index d9a7b36346..286e2175f2 100644 --- a/repos/gems/src/server/wm/decorator_gui.h +++ b/repos/gems/src/server/wm/decorator_gui.h @@ -180,12 +180,13 @@ struct Wm::Decorator_gui_session : Session_object, case Command::FRONT_OF: case Command::BEHIND_OF: + _real_gui.enqueue(cmd); _content_view_ids.apply(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: