diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2020-05-02 20:23:05 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-02 20:27:07 +0200 |
commit | e347d6bdb852ecaf024ee4b655e4d084971503ea (patch) | |
tree | bb280658d88ca82818f248c348684e06cd435fcd /Libraries/LibGUI/Window.cpp | |
parent | a63e8c4a0374ffd3e20a67260753d051c9a9c8dc (diff) | |
download | serenity-e347d6bdb852ecaf024ee4b655e4d084971503ea.zip |
LibGUI: Properly remove auto-destroyed child windows from reified_windows.
I just spotted this while I saw you writing this code :-)
Diffstat (limited to 'Libraries/LibGUI/Window.cpp')
-rw-r--r-- | Libraries/LibGUI/Window.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibGUI/Window.cpp b/Libraries/LibGUI/Window.cpp index 1e7b4069d6..e0b791cab9 100644 --- a/Libraries/LibGUI/Window.cpp +++ b/Libraries/LibGUI/Window.cpp @@ -128,6 +128,7 @@ Window* Window::find_parent_window() void Window::server_did_destroy() { + reified_windows->remove(m_window_id); m_window_id = 0; m_visible = false; m_pending_paint_event_rects.clear(); @@ -140,7 +141,6 @@ void Window::hide() { if (!is_visible()) return; - reified_windows->remove(m_window_id); auto response = WindowServerConnection::the().send_sync<Messages::WindowServer::DestroyWindow>(m_window_id); server_did_destroy(); |