LibGUI: Properly remove auto-destroyed child windows from reified_windows.

I just spotted this while I saw you writing this code :-)
This commit is contained in:
Emilio Cobos Álvarez 2020-05-02 20:23:05 +02:00 committed by Andreas Kling
parent a63e8c4a03
commit e347d6bdb8
Notes: sideshowbarker 2024-07-19 07:02:27 +09:00

View file

@ -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();