[gtk+/wip/carlosg/event-delivery: 87/105] combobox: Only react to UP/DOWN scroll events
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/carlosg/event-delivery: 87/105] combobox: Only react to UP/DOWN scroll events
- Date: Sun, 14 May 2017 23:44:46 +0000 (UTC)
commit 5734666e0996f472e2699bcff0372076f4dab49e
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]