mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-30 05:08:56 +00:00
LibGUI: GDialog should close its nested event loop on window close.
Make GWindow::close() so we can override it in GDialog and quit from the internal event loop when the window manager tells us to close ourselves. The dialog will return GDialog::ExecCancel in these situations.
This commit is contained in:
@@ -40,3 +40,10 @@ void GDialog::done(int result)
|
||||
dbgprintf("%s: quit event loop with result %d\n", class_name(), result);
|
||||
m_event_loop->quit(result);
|
||||
}
|
||||
|
||||
void GDialog::close()
|
||||
{
|
||||
GWindow::close();
|
||||
m_event_loop->quit(ExecCancel);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user