mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
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:
@@ -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()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user