[text] Queue a redraw when the selection is cleared
If you select all the text in a ClutterText, there is an invisible cursor position either at the beginning or end. If it's at the beginning, the bug is that left arrow won't clear the selection. If it's at the end, the bug is that the right arrow won't. Here are the ways to reproduce it: a. Ctrl-A selects all and moves the hidden cursor position to the left. b. For single line: End, Shift-Home does the same. c. Or manually moving to the end and doing Shift-Left Arrow to the beginning. These all put it in the state where right arrow will properly clear selection and move to cursor position 1, but left arrow fails to clear the selection. For b and c above, the opposite will give you the end case where right arrow doesn't work. Anyway, it turns out clear_selection is getting called, it just doesn't show up because it's not doing a queue_redraw. So the attached patch seems to fix things. Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
This commit is contained in:
parent
29d8d60487
commit
6a1506bd5f
@ -235,7 +235,11 @@ clutter_text_clear_selection (ClutterText *self)
|
|||||||
{
|
{
|
||||||
ClutterTextPrivate *priv = self->priv;
|
ClutterTextPrivate *priv = self->priv;
|
||||||
|
|
||||||
priv->selection_bound = priv->position;
|
if (priv->selection_bound != priv->position)
|
||||||
|
{
|
||||||
|
priv->selection_bound = priv->position;
|
||||||
|
clutter_actor_queue_redraw (CLUTTER_ACTOR (self));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static PangoLayout *
|
static PangoLayout *
|
||||||
|
Loading…
Reference in New Issue
Block a user