diff options
author | Nelson Benitez Leon <nbenitezl@gmail.com> | 2013-10-22 12:24:55 +0200 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2015-01-10 14:36:17 -0500 |
commit | 885b36a6d53d8a7ca4f594f27416fd4104b77082 (patch) | |
tree | bbfeb5b450142838ebaedc6a6b3f75d7881b09ac /gtk/gtktextview.c | |
parent | 5d9710cc7f8e64bae14887e76889c7e39ffc4569 (diff) | |
download | gtk+-885b36a6d53d8a7ca4f594f27416fd4104b77082.tar.gz |
GtkTextView: allow to extend text selection with mouse scrollwheel
Fixes bug 710612
Diffstat (limited to 'gtk/gtktextview.c')
-rw-r--r-- | gtk/gtktextview.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index 96dca1d937..cdf7503e10 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -8501,6 +8501,20 @@ gtk_text_view_value_changed (GtkAdjustment *adjustment, priv->first_validate_idle = 0; } + /* Allow to extend selection with mouse scrollwheel. Bug 710612 */ + if (gtk_gesture_is_active (priv->drag_gesture)) + { + GdkEvent *current_event; + current_event = gtk_get_current_event (); + if (current_event != NULL) + { + if (current_event->type == GDK_SCROLL) + move_mark_to_pointer_and_scroll (text_view, "insert"); + + gdk_event_free (current_event); + } + } + /* Finally we update the IM cursor location again, to ensure any * changes made by the validation are pushed through. */ |