1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 04:08:11 +00:00

LibGUI: Add Window::on_close hook

This will be invoked when the window is closed, which is helpful if you
want to remove the window from some kind of owner after it's closed.
This commit is contained in:
Andreas Kling 2021-01-02 00:32:26 +01:00
parent a1904b67e9
commit c381e7f5a0
2 changed files with 3 additions and 0 deletions

View file

@ -94,6 +94,8 @@ Window::~Window()
void Window::close()
{
hide();
if (on_close)
on_close();
}
void Window::move_to_front()