1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-24 23:17:44 +00:00

WindowServer: Always restore modal chain when clicking a window

Refactors restore helper into move_to_front_and_make_active().
Fixes not bringing all modal children to the front when any modal
child or its modeless parent is clicked.
This commit is contained in:
thankyouverycool 2022-08-25 14:41:33 -04:00 committed by Andreas Kling
parent d815f659cc
commit aa045a9fdf
4 changed files with 8 additions and 13 deletions

View file

@ -90,7 +90,7 @@ void WindowSwitcher::on_key_event(KeyEvent const& event)
if (event.type() == Event::KeyUp) {
if (event.key() == (m_mode == Mode::ShowAllWindows ? Key_Super : Key_Alt)) {
if (auto* window = selected_window()) {
WindowManager::the().restore_modal_chain(*window);
WindowManager::the().move_to_front_and_make_active(*window);
}
WindowManager::the().set_highlight_window(nullptr);
hide();