mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
GDialog: Remove self from parent when the nested event loop returns
This ensures that we close (and don't leak) the dialog during the typical usage pattern.
This commit is contained in:
parent
e61aa01745
commit
bd1e8bf166
Notes:
sideshowbarker
2024-07-19 12:00:33 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/bd1e8bf1663
1 changed files with 1 additions and 0 deletions
|
@ -29,6 +29,7 @@ int GDialog::exec()
|
|||
auto result = m_event_loop->exec();
|
||||
m_event_loop = nullptr;
|
||||
dbgprintf("%s: event loop returned with result %d\n", class_name(), result);
|
||||
remove_from_parent();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue