combobox: Don’t select active item if it’s hidden
authorDaniel Boles <dboles@src.gnome.org>
Wed, 18 Jan 2017 22:17:37 +0000 (22:17 +0000)
committerDaniel Boles <dboles@src.gnome.org>
Wed, 18 Jan 2017 22:17:37 +0000 (22:17 +0000)
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

index dc81769e404fc73843c66874bf324c8499c1a639..4b1065905e28a04eb79e2d1122e3ca195d04f5b6 100644 (file)
@@ -2179,7 +2179,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)
             {