diff --git a/gtk/gtkcolorbutton.c b/gtk/gtkcolorbutton.c
index b77ea28496..ea0def3d6a 100644
--- a/gtk/gtkcolorbutton.c
+++ b/gtk/gtkcolorbutton.c
@@ -559,6 +559,8 @@ ensure_dialog (GtkColorButton *button)
 
   g_signal_connect (dialog, "response",
                     G_CALLBACK (dialog_response), button);
+  g_signal_connect (dialog, "delete-event",
+                    G_CALLBACK (gtk_widget_hide_on_delete), NULL);
   g_signal_connect (dialog, "destroy",
                     G_CALLBACK (dialog_destroy), button);
 }
