[gtk+/wip/carlosg/event-delivery: 70/72] combobox: Only react to UP/DOWN scroll events



commit d561c3d86c7f0a6148aa6ee6b150a0520d2c2ad0
Author: Timm Bäder <mail baedert org>
Date:   Tue May 9 08:22:41 2017 +0200

    combobox: Only react to UP/DOWN scroll events
    
    The old else block scrolled down for everything except GDK_SCROLL_UP
    scroll events, e.g. for smooth scroll events.

 gtk/gtkcombobox.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index e07a183..bcdad85 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -1943,7 +1943,7 @@ gtk_combo_box_scroll_event (GtkWidget          *widget,
 {
   GtkComboBox *combo_box = GTK_COMBO_BOX (widget);
   GtkComboBoxPrivate *priv = combo_box->priv;
-  gboolean found;
+  gboolean found = FALSE;
   GtkTreeIter iter;
   GtkTreeIter new_iter;
 
@@ -1953,7 +1953,7 @@ gtk_combo_box_scroll_event (GtkWidget          *widget,
   if (event->direction == GDK_SCROLL_UP)
     found = tree_prev (combo_box, priv->model,
                        &iter, &new_iter);
-  else
+  else if (event->direction == GDK_SCROLL_DOWN)
     found = tree_next (combo_box, priv->model,
                        &iter, &new_iter);
 


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