summaryrefslogtreecommitdiff
path: root/WindowServer/WSWindow.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-01-30 19:35:38 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-01-30 19:35:38 +0100
commit5c25f0c4db9584adacd8b0446fdc0d5524fe7b31 (patch)
tree31a688a85cacb1f7dd92687d96423e65d69d5256 /WindowServer/WSWindow.cpp
parent3a4207b863954249e1436eccb69e4d865b75970c (diff)
downloadserenity-5c25f0c4db9584adacd8b0446fdc0d5524fe7b31.zip
Destroy all remaining windows in a process when it dies.
Diffstat (limited to 'WindowServer/WSWindow.cpp')
-rw-r--r--WindowServer/WSWindow.cpp5
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)