mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 17:55:08 +00:00
LibGUI: Implement destroying individual windows without exiting the process.
This commit is contained in:
parent
5c25f0c4db
commit
37ab7b7a8c
8 changed files with 85 additions and 30 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue