mirror of
https://github.com/RGBCube/serenity
synced 2025-05-24 03:55:06 +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:
parent
c6899b0910
commit
2ac1fbef4f
2 changed files with 9 additions and 1 deletions
|
@ -229,6 +229,9 @@ public:
|
||||||
|
|
||||||
void set_parent_window(Window&);
|
void set_parent_window(Window&);
|
||||||
|
|
||||||
|
Vector<WeakPtr<Window>>& child_windows() { return m_child_windows; }
|
||||||
|
const Vector<WeakPtr<Window>>& child_windows() const { return m_child_windows; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void handle_mouse_event(const MouseEvent&);
|
void handle_mouse_event(const MouseEvent&);
|
||||||
void update_menu_item_text(PopupMenuItem item);
|
void update_menu_item_text(PopupMenuItem item);
|
||||||
|
|
|
@ -47,8 +47,8 @@
|
||||||
#include <WindowServer/Cursor.h>
|
#include <WindowServer/Cursor.h>
|
||||||
#include <WindowServer/WindowClientEndpoint.h>
|
#include <WindowServer/WindowClientEndpoint.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdio.h>
|
|
||||||
#include <serenity.h>
|
#include <serenity.h>
|
||||||
|
#include <stdio.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
@ -218,6 +218,11 @@ void WindowManager::move_to_front_and_make_active(Window& window)
|
||||||
m_switcher.select_window(window);
|
m_switcher.select_window(window);
|
||||||
set_highlight_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)
|
void WindowManager::remove_window(Window& window)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue