From: Matthias Clasen Date: Thu, 24 Nov 2022 15:29:03 +0000 (-0500) Subject: color dialog: Handle Escape better X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~9^2~75^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ff14c5195058e6b165f70a91f8e43a60e6646174;p=gtk4.git color dialog: Handle Escape better Closing the dialog by hitting Escape should have the same effect as clicking the cancel button. Make it so. --- diff --git a/gtk/gtkcolordialog.c b/gtk/gtkcolordialog.c index 8c09570df9..05b2f64a71 100644 --- a/gtk/gtkcolordialog.c +++ b/gtk/gtkcolordialog.c @@ -388,7 +388,8 @@ G_GNUC_END_IGNORE_DEPRECATIONS } else if (response == GTK_RESPONSE_CLOSE) g_task_return_new_error (task, GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_ABORTED, "Aborted by application"); - else if (response == GTK_RESPONSE_CANCEL) + else if (response == GTK_RESPONSE_CANCEL || + response == GTK_RESPONSE_DELETE_EVENT) g_task_return_new_error (task, GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_CANCELLED, "Cancelled by user"); else g_task_return_new_error (task, GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_FAILED, "Unknown failure (%d)", response);