1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-23 18:05:08 +00:00

WindowServer: Don't allow parent windows to go above their children

Whenever a parent window is moved to front, we now follow up by
immediately moving its children to front as well.
This commit is contained in:
Andreas Kling 2020-05-01 23:12:15 +02:00
parent c6899b0910
commit 2ac1fbef4f
2 changed files with 9 additions and 1 deletions

View file

@ -47,8 +47,8 @@
#include <WindowServer/Cursor.h>
#include <WindowServer/WindowClientEndpoint.h>
#include <errno.h>
#include <stdio.h>
#include <serenity.h>
#include <stdio.h>
#include <time.h>
#include <unistd.h>
@ -218,6 +218,11 @@ void WindowManager::move_to_front_and_make_active(Window& window)
m_switcher.select_window(window);
set_highlight_window(&window);
}
for (auto& child_window : window.child_windows()) {
if (child_window)
move_to_front_and_make_active(*child_window);
}
}
void WindowManager::remove_window(Window& window)