mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:07:34 +00:00
WindowServer: Fixes for modal windows
This fixes a few problems with modal windows: * If any child window, or any child window further down the tree is considered modal, then all windows in that chain are modal. * When trying to activate a window blocked by a modal child bring the entire stack of modal windows to the front and activate the modal window. * A window is modal if it has a parent and it's flagged as modal, regardless of whether the ClientConnection has created modal windows. This technically supports diverging modal window trees as well, where two modal windows share the same parent, allowing both to be activated (including for input) but not the parent. And it should also support modal window stacks of arbitrary depth.
This commit is contained in:
parent
a038f82326
commit
862ab82c19
6 changed files with 63 additions and 42 deletions
|
@ -112,7 +112,6 @@ public:
|
|||
Window* active_input_window() { return m_active_input_window.ptr(); }
|
||||
const Window* active_input_window() const { return m_active_input_window.ptr(); }
|
||||
const ClientConnection* active_client() const;
|
||||
bool active_window_is_modal() const { return m_active_window && m_active_window->is_modal(); }
|
||||
|
||||
const Window* highlight_window() const { return m_highlight_window.ptr(); }
|
||||
void set_highlight_window(Window*);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue