fix: gtk_native_dialog_run() calls show() internally (#32081)

In the synchronous code path, gtk_native_dialog_run() will call
gtk_native_dialog_show(). Previously this was causing an assertion to be
hit at run time.

Co-authored-by: Tristan Partin <tristan@partin.io>
This commit is contained in:
trop[bot]
2021-12-06 11:29:54 +09:00
committed by GitHub
parent ed52801e09
commit 248a6012d5

View File

@@ -412,9 +412,8 @@ void FileChooserDialog::OnUpdatePreview(GtkFileChooser* chooser) {
} // namespace
void ShowFileDialog(const FileChooserDialog& dialog) {
if (*supports_gtk_file_chooser_native) {
dl_gtk_native_dialog_show(static_cast<void*>(dialog.dialog()));
} else {
// gtk_native_dialog_run() will call gtk_native_dialog_show() for us.
if (!*supports_gtk_file_chooser_native) {
gtk_widget_show_all(GTK_WIDGET(dialog.dialog()));
}
}