summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntónio Fernandes <antoniof@gnome.org>2022-12-19 22:50:47 +0000
committerAntónio Fernandes <antoniof@gnome.org>2022-12-19 22:56:08 +0000
commit5ef64850fa92cda88af4c132b55bbbd2e43a67dd (patch)
treed5712b98dc7bcd9d9951f6e3cf315a1e81eb4ca4
parent2ae52ceb4d9bc7a9f1bce39f0d56b2c09def8f8d (diff)
downloadnautilus-5ef64850fa92cda88af4c132b55bbbd2e43a67dd.tar.gz
autorun-software: Keep running until response
When moving away from gtk_dialog_run() [0], we forgot this small program is not part of the main application. So, without anything blocking the `main()` function, it's going to quit right away, without ever drawing the dialog. Credit goes to Will Thompson for diagnosing the issue, and GTK test suit for the while loop solution I've taken from there. Closes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2209 [0] d87f5be77bb4ee03e363cb560aaefb00cf56b275
-rw-r--r--src/nautilus-autorun-software.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nautilus-autorun-software.c b/src/nautilus-autorun-software.c
index 3178c2158..fd8ab3eab 100644
--- a/src/nautilus-autorun-software.c
+++ b/src/nautilus-autorun-software.c
@@ -274,6 +274,11 @@ main (int argc,
present_autorun_for_software_dialog (mount);
+ while (g_list_model_get_n_items (gtk_window_get_toplevels ()) > 0)
+ {
+ g_main_context_iteration (NULL, TRUE);
+ }
+
out:
return 0;
}