mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 07:07:23 +00:00
LibGUI: Implement destroying individual windows without exiting the process.
This commit is contained in:
@@ -80,6 +80,8 @@ int Process::gui$destroy_window(int window_id)
|
||||
auto it = m_windows.find(window_id);
|
||||
if (it == m_windows.end())
|
||||
return -EBADWINDOW;
|
||||
auto message = make<WSMessage>(WSMessage::WM_DestroyWindow);
|
||||
WSMessageLoop::the().post_message((*it).value.leakPtr(), move(message), true);
|
||||
m_windows.remove(window_id);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user