From d1f2e5896b3b0faedb05a68a4151e33eba687b51 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 13 Jun 2015 22:32:05 -0400 Subject: [PATCH] color editor: make popups toggleable The popups on the color editor are somewhat hard to get rid of. Arrange things so that clicking the same control again dismisses the current popup. --- gtk/gtkcoloreditor.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gtk/gtkcoloreditor.c b/gtk/gtkcoloreditor.c index 6eabba71af..8fbc8d5dbc 100644 --- a/gtk/gtkcoloreditor.c +++ b/gtk/gtkcoloreditor.c @@ -202,7 +202,9 @@ popup_edit (GtkWidget *widget, focus = editor->priv->a_entry; } - if (popup) + if (popup == editor->priv->current_popup) + dismiss_current_popup (editor); + else if (popup) { dismiss_current_popup (editor); toplevel = gtk_widget_get_toplevel (GTK_WIDGET (editor));