[gtk+/touch-text-selection] entry: revert the code preventing initial backwards selection



commit 3158630a68aa4b8886a259ba5a0bbb4ed52f44a0
Author: Carlos Garnacho <carlos lanedo com>
Date:   Mon Aug 27 14:47:06 2012 +0200

    entry: revert the code preventing initial backwards selection
    
    With the handles being invariably set to the min/max selection positions,
    it's no longer necessary to keep this invariant when starting a selection.
    
    Note that dragging from the text handles themselves will still disallow
    both handles from crossing.

 gtk/gtkentry.c |   15 +--------------
 1 files changed, 1 insertions(+), 14 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index cd67d39..9f1412a 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -4390,23 +4390,10 @@ gtk_entry_motion_notify (GtkWidget      *widget,
 		pos = min;
 	    }
 
-          /* Don't allow backwards selection on touch devices,
-           * so handles don't get inverted.
-           */
-          if (test_touchscreen || input_source == GDK_SOURCE_TOUCHSCREEN)
-            pos = MIN (MAX (pos, gtk_entry_move_backward_word (entry, bound, TRUE)), length);
-
 	  gtk_entry_set_positions (entry, pos, bound);
 	}
       else
-        {
-          /* Don't allow backwards selection on touch devices,
-           * so handles don't get inverted.
-           */
-          if (test_touchscreen || input_source == GDK_SOURCE_TOUCHSCREEN)
-            tmp_pos = MIN (MAX (tmp_pos, priv->selection_bound + 1), length);
-          gtk_entry_set_positions (entry, tmp_pos, -1);
-        }
+        gtk_entry_set_positions (entry, tmp_pos, -1);
 
       /* Update touch handles' position */
       if (test_touchscreen || input_source == GDK_SOURCE_TOUCHSCREEN)



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