GdkDevice *source;
guint length;
int tmp_pos;
-
- gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_CLAIMED);
+ int pos, bound;
length = gtk_entry_buffer_get_length (get_buffer (self));
{
int min, max;
int old_min, old_max;
- int pos, bound;
min = gtk_text_move_backward_word (self, tmp_pos, TRUE);
max = gtk_text_move_forward_word (self, tmp_pos, TRUE);
if (priv->current_pos != max)
pos = min;
}
-
- gtk_text_set_positions (self, pos, bound);
}
else
- gtk_text_set_positions (self, tmp_pos, -1);
+ {
+ pos = tmp_pos;
+ bound = -1;
+ }
+
+ if (pos != priv->current_pos)
+ gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_CLAIMED);
+
+ gtk_text_set_positions (self, pos, bound);
/* Update touch handles' position */
if (gtk_simulate_touchscreen () ||