mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 01:08:11 +00:00
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:
parent
a63e8c4a03
commit
e347d6bdb8
1 changed files with 1 additions and 1 deletions
|
@ -128,6 +128,7 @@ Window* Window::find_parent_window()
|
||||||
|
|
||||||
void Window::server_did_destroy()
|
void Window::server_did_destroy()
|
||||||
{
|
{
|
||||||
|
reified_windows->remove(m_window_id);
|
||||||
m_window_id = 0;
|
m_window_id = 0;
|
||||||
m_visible = false;
|
m_visible = false;
|
||||||
m_pending_paint_event_rects.clear();
|
m_pending_paint_event_rects.clear();
|
||||||
|
@ -140,7 +141,6 @@ void Window::hide()
|
||||||
{
|
{
|
||||||
if (!is_visible())
|
if (!is_visible())
|
||||||
return;
|
return;
|
||||||
reified_windows->remove(m_window_id);
|
|
||||||
auto response = WindowServerConnection::the().send_sync<Messages::WindowServer::DestroyWindow>(m_window_id);
|
auto response = WindowServerConnection::the().send_sync<Messages::WindowServer::DestroyWindow>(m_window_id);
|
||||||
server_did_destroy();
|
server_did_destroy();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue