diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-01-30 19:35:38 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-01-30 19:35:38 +0100 |
commit | 5c25f0c4db9584adacd8b0446fdc0d5524fe7b31 (patch) | |
tree | 31a688a85cacb1f7dd92687d96423e65d69d5256 /WindowServer/WSWindow.cpp | |
parent | 3a4207b863954249e1436eccb69e4d865b75970c (diff) | |
download | serenity-5c25f0c4db9584adacd8b0446fdc0d5524fe7b31.zip |
Destroy all remaining windows in a process when it dies.
Diffstat (limited to 'WindowServer/WSWindow.cpp')
-rw-r--r-- | WindowServer/WSWindow.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/WindowServer/WSWindow.cpp b/WindowServer/WSWindow.cpp index 81a24ef20e..dfaebea425 100644 --- a/WindowServer/WSWindow.cpp +++ b/WindowServer/WSWindow.cpp @@ -107,12 +107,17 @@ void WSWindow::on_message(WSMessage& message) case WSMessage::WM_SetWindowTitle: set_title(static_cast<WSSetWindowTitleMessage&>(message).title()); return; + case WSMessage::WM_DestroyWindow: + delete this; + return; case WSMessage::WindowActivated: gui_event.type = GUI_Event::Type::WindowActivated; break; case WSMessage::WindowDeactivated: gui_event.type = GUI_Event::Type::WindowDeactivated; break; + default: + break; } if (gui_event.type == GUI_Event::Type::Invalid) |