diff options
author | Benjamin Otte <otte@redhat.com> | 2017-11-11 02:47:59 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2017-11-11 02:49:08 +0100 |
commit | 52424d86405676bc4d6978e2114ebd0ecf34cfd3 (patch) | |
tree | 5ce929a26a861481685b0152e98728ce4882c714 /gtk/gtktextview.c | |
parent | e9dd5f327ff4754ab1c5bf64aaea09a288b7748a (diff) | |
download | gtk+-52424d86405676bc4d6978e2114ebd0ecf34cfd3.tar.gz |
textview: Hide the selection bubble better
The selection bubble is not part of the text windows, so hiding it
during scroll should not be done in the text window code.
Also remove an unused variable that was only set in that code but never
read.
Diffstat (limited to 'gtk/gtktextview.c')
-rw-r--r-- | gtk/gtktextview.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index bfa4ede001..36734e1230 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -288,7 +288,6 @@ struct _GtkTextViewPrivate guint selection_handle_dragged : 1; guint populate_all : 1; - guint in_scroll : 1; guint handling_key_event : 1; }; @@ -8697,6 +8696,9 @@ gtk_text_view_value_changed (GtkAdjustment *adjustment, if (gtk_widget_get_realized (GTK_WIDGET (text_view))) { + if (priv->selection_bubble) + gtk_widget_hide (priv->selection_bubble); + if (dy != 0) { if (priv->left_window) @@ -9790,17 +9792,8 @@ text_window_scroll (GtkTextWindow *win, gint dx, gint dy) { - GtkTextView *view = GTK_TEXT_VIEW (win->widget); - GtkTextViewPrivate *priv = view->priv; - if (dx != 0 || dy != 0) - { - if (priv->selection_bubble) - gtk_widget_hide (priv->selection_bubble); - view->priv->in_scroll = TRUE; - gdk_window_scroll (win->bin_window, dx, dy); - view->priv->in_scroll = FALSE; - } + gdk_window_scroll (win->bin_window, dx, dy); } static void |