1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:27:35 +00:00

WindowServer: Rename Window::outer_stack -> Window::window_stack

Also, make it return a reference as aside from only three special
situations (creating, destroying, and moving a window between stacks)
a window should always be on a window stack. Any access during those
brief situations would be a bug, so we should VERIFY this.
This commit is contained in:
Tom 2021-07-02 13:52:23 -06:00 committed by Andreas Kling
parent 6ec35c91bc
commit 0fcb048448
6 changed files with 46 additions and 42 deletions

View file

@ -664,9 +664,12 @@ void Window::clear_dirty_rects()
bool Window::is_active() const
{
if (!outer_stack())
if (!m_window_stack) {
// This may be called while destroying a window as part of
// determining what the render rectangle is!
return false;
return outer_stack()->active_window() == this;
}
return m_window_stack->active_window() == this;
}
Window* Window::blocking_modal_window()