[gtk+] combobox: Don’t select active item if it’s hidden



commit 7a5c995fd4a5da18fafbdecee7cd151766e8b00b
Author: Daniel Boles <dboles src gnome org>
Date:   Wed Jan 18 22:17:37 2017 +0000

    combobox: Don’t select active item if it’s hidden
    
    I hope no one ever actually brings such a silly item into this world,
    but this achieves symmetry with the similar checks immediately after.

 gtk/gtkcombobox.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index 2b12ed0..4b3c9f8 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -1760,7 +1760,7 @@ gtk_combo_box_menu_popup (GtkComboBox    *combo_box,
       GList *i;
       GtkWidget *child;
 
-      if (!active)
+      if (!(active && gtk_widget_get_visible (active)))
         {
           for (i = GTK_MENU_SHELL (priv->popup_widget)->priv->children; i && !active; i = i->next)
             {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]