summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntónio Fernandes <antoniof@gnome.org>2022-12-18 19:53:53 +0000
committerAntónio Fernandes <antoniof@gnome.org>2023-01-06 19:34:10 +0000
commitca0008007cc3288e5c7bdec8f02c0735c97dbb78 (patch)
treea81b3c8cf4eb8953c53200e91da9263bf4fb578f
parentd0ffdabdbb87df7949731a44c52f62d6dcd39580 (diff)
downloadnautilus-ca0008007cc3288e5c7bdec8f02c0735c97dbb78.tar.gz
file-operations: Always unlock worker thread on GtkDialog::respose
The worker thread is blocked while waiting for user response on the main thread, through a GtkDialog. It gets unblocked upon response. Except... we have an early return on our ::response hanlder, which causes the worker thread never to be unblocked. This comes from 38a04943f9029ed4e8c7481b05502454a82a2811 The apparent intention was to presenve the behaviour from when we were would calling gtk_dialog_run() in a loop. Maybe it worked under GTK3, but it definitely doesn't under GTK4. Fortunately, this should be dead code, because data->ignore_close_box is always FALSE. Yet, under irregular situations, it may be reached, as the following report suggests. So, it's best to remove this code which is both wrong and unused. Closes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2604
-rw-r--r--src/nautilus-file-operations.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c
index f223f9373..805a049cb 100644
--- a/src/nautilus-file-operations.c
+++ b/src/nautilus-file-operations.c
@@ -1327,11 +1327,6 @@ simple_dialog_cb (GtkDialog *dialog,
{
RunSimpleDialogData *data = user_data;
- if ((response_id == GTK_RESPONSE_NONE || response_id == GTK_RESPONSE_DELETE_EVENT) && data->ignore_close_box)
- {
- return;
- }
-
gtk_window_destroy (GTK_WINDOW (dialog));
data->result = response_id;