diff options
author | Marcus Nilsson <brainbomb@gmail.com> | 2021-06-02 12:28:52 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-06-02 18:08:56 +0200 |
commit | 734bd9841ad3d35c30ae34546f6f6d1215a260a4 (patch) | |
tree | f323ab0dc082b55745eb1b83000b2bd6fb3cb8a8 | |
parent | b5778675a59b1bd43616f65a9ec20221c7256fa4 (diff) | |
download | serenity-734bd9841ad3d35c30ae34546f6f6d1215a260a4.zip |
Terminal: Close find & settings windows on application exit
Since the find & settings windows are not children of the main window,
they stayed open after exiting the application.
-rw-r--r-- | Userland/Applications/Terminal/main.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Userland/Applications/Terminal/main.cpp b/Userland/Applications/Terminal/main.cpp index 7704e02386..50fe3002a5 100644 --- a/Userland/Applications/Terminal/main.cpp +++ b/Userland/Applications/Terminal/main.cpp @@ -393,6 +393,13 @@ int main(int argc, char** argv) window->set_menubar(menubar); + window->on_close = [&]() { + if (find_window) + find_window->close(); + if (settings_window) + settings_window->close(); + }; + if (unveil("/res", "r") < 0) { perror("unveil"); return 1; |