[gtk+] texthandle: Ensure handles are invalidated on mode changes



commit 8147f12ecaa726ce52af50946c70fd54b608c809
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Oct 14 17:27:53 2015 +0200

    texthandle: Ensure handles are invalidated on mode changes
    
    Otherwise the "cursor" handle stays with "cursor" appearance instead of
    "selection end" when a text selection is started.

 gtk/gtktexthandle.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtktexthandle.c b/gtk/gtktexthandle.c
index ebc5c88..f4650e1 100644
--- a/gtk/gtktexthandle.c
+++ b/gtk/gtktexthandle.c
@@ -772,6 +772,11 @@ _gtk_text_handle_set_mode (GtkTextHandle     *handle,
 
   _gtk_text_handle_update (handle, GTK_TEXT_HANDLE_POSITION_SELECTION_START);
   _gtk_text_handle_update (handle, GTK_TEXT_HANDLE_POSITION_SELECTION_END);
+
+  if (start->widget && start->mode_visible)
+    gtk_widget_queue_draw (start->widget);
+  if (end->widget && end->mode_visible)
+    gtk_widget_queue_draw (end->widget);
 }
 
 GtkTextHandleMode


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