Skip to content

Commit

Permalink
fix: gtk_native_dialog_run() calls show() internally (#32082)
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.

Co-authored-by: Tristan Partin <tristan@partin.io>
  • Loading branch information
trop[bot] and tristan957 committed Dec 6, 2021
1 parent 4aef2d7 commit 371a61d
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 @@ -410,9 +410,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 371a61d

Please sign in to comment.