mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-08 18:46:03 +00:00
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.
This commit is contained in:
parent
b5778675a5
commit
734bd9841a
Notes:
sideshowbarker
2024-07-18 17:00:29 +09:00
Author: https://github.com/metmo
Commit: 734bd9841a
Pull-request: https://github.com/SerenityOS/serenity/pull/7694
Issue: https://github.com/SerenityOS/serenity/issues/7465
1 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue