Skip to content

Commit

Permalink
fix: gtk_native_dialog_run() calls show() internally (#32049)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tristan957 committed Dec 2, 2021
1 parent cce427d commit eabfd6c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions shell/browser/ui/file_dialog_gtk.cc
Expand Up @@ -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()));
}
}
Expand Down

0 comments on commit eabfd6c

Please sign in to comment.