mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 02:12:09 -05:00
LibGUI: Always close() Dialogs no matter the execution result
Fixes Blocking modal race conditions when new windows are created in the same scope as Dialogs.
This commit is contained in:
parent
2028fbeae3
commit
5c923977b7
1 changed files with 2 additions and 1 deletions
|
@ -112,6 +112,8 @@ Dialog::ExecResult Dialog::exec()
|
||||||
|
|
||||||
void Dialog::done(ExecResult result)
|
void Dialog::done(ExecResult result)
|
||||||
{
|
{
|
||||||
|
Window::close();
|
||||||
|
|
||||||
if (!m_event_loop)
|
if (!m_event_loop)
|
||||||
return;
|
return;
|
||||||
m_result = result;
|
m_result = result;
|
||||||
|
@ -137,7 +139,6 @@ void Dialog::event(Core::Event& event)
|
||||||
|
|
||||||
void Dialog::close()
|
void Dialog::close()
|
||||||
{
|
{
|
||||||
Window::close();
|
|
||||||
done(ExecResult::Cancel);
|
done(ExecResult::Cancel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue