summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlejandro Piñeiro <apinheiro@igalia.com>2014-01-14 18:43:48 +0100
committerAlejandro Piñeiro <apinheiro@igalia.com>2014-01-14 19:08:29 +0100
commit56e8a649f72bcefefe7a01098c8b63fc234ab0ee (patch)
tree61a34afdf0d6f612cae34ad4cea8e4e3954a4a29
parent68885bf9ad6ce641dc0616a3ab5e8b69d4391e8d (diff)
downloadclutter-56e8a649f72bcefefe7a01098c8b63fc234ab0ee.tar.gz
a11y: compute properly if there is text selected
https://bugzilla.gnome.org/show_bug.cgi?id=722188
-rw-r--r--clutter/cally/cally-text.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/clutter/cally/cally-text.c b/clutter/cally/cally-text.c
index 3e75d1da0..b5b807e9b 100644
--- a/clutter/cally/cally-text.c
+++ b/clutter/cally/cally-text.c
@@ -1233,6 +1233,7 @@ cally_text_get_n_selections (AtkText *text)
{
ClutterActor *actor = NULL;
gint selection_bound = -1;
+ gint cursor_position = -1;
actor = CALLY_GET_CLUTTER_ACTOR (text);
if (actor == NULL) /* State is defunct */
@@ -1242,11 +1243,12 @@ cally_text_get_n_selections (AtkText *text)
return 0;
selection_bound = clutter_text_get_selection_bound (CLUTTER_TEXT (actor));
+ cursor_position = clutter_text_get_cursor_position (CLUTTER_TEXT (actor));
- if (selection_bound > 0)
- return 1;
- else
+ if (selection_bound == cursor_position)
return 0;
+ else
+ return 1;
}
static gchar*