From 8d56346f9bdb8a82c16fe56708148e9392d9025f Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Wed, 10 Jun 2015 20:53:12 +0200 Subject: [PATCH] textview: set text direction information on text handles This makes them point to the correct place, given the theme supports this. --- gtk/gtktextview.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index 2badc835b4..7edb925e64 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -4732,6 +4732,9 @@ gtk_text_view_set_handle_position (GtkTextView *text_view, } else { + GtkTextDirection dir = GTK_TEXT_DIR_LTR; + GtkTextAttributes attributes = { 0 }; + _gtk_text_handle_set_visible (priv->text_handle, pos, TRUE); rect.x = CLAMP (x, 0, SCREEN_WIDTH (text_view)); @@ -4739,6 +4742,11 @@ gtk_text_view_set_handle_position (GtkTextView *text_view, _text_window_to_widget_coords (text_view, &rect.x, &rect.y); _gtk_text_handle_set_position (priv->text_handle, pos, &rect); + + if (gtk_text_iter_get_attributes (iter, &attributes)) + dir = attributes.direction; + + _gtk_text_handle_set_direction (priv->text_handle, pos, dir); } }