mirror of
https://github.com/brl/mutter.git
synced 2024-12-24 20:12:06 +00:00
a11y: compute properly if there is text selected
https://bugzilla.gnome.org/show_bug.cgi?id=722188
This commit is contained in:
parent
4f5698199f
commit
c681e901e4
@ -1233,6 +1233,7 @@ cally_text_get_n_selections (AtkText *text)
|
|||||||
{
|
{
|
||||||
ClutterActor *actor = NULL;
|
ClutterActor *actor = NULL;
|
||||||
gint selection_bound = -1;
|
gint selection_bound = -1;
|
||||||
|
gint cursor_position = -1;
|
||||||
|
|
||||||
actor = CALLY_GET_CLUTTER_ACTOR (text);
|
actor = CALLY_GET_CLUTTER_ACTOR (text);
|
||||||
if (actor == NULL) /* State is defunct */
|
if (actor == NULL) /* State is defunct */
|
||||||
@ -1242,11 +1243,12 @@ cally_text_get_n_selections (AtkText *text)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
selection_bound = clutter_text_get_selection_bound (CLUTTER_TEXT (actor));
|
selection_bound = clutter_text_get_selection_bound (CLUTTER_TEXT (actor));
|
||||||
|
cursor_position = clutter_text_get_cursor_position (CLUTTER_TEXT (actor));
|
||||||
|
|
||||||
if (selection_bound > 0)
|
if (selection_bound == cursor_position)
|
||||||
return 1;
|
|
||||||
else
|
|
||||||
return 0;
|
return 0;
|
||||||
|
else
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gchar*
|
static gchar*
|
||||||
|
Loading…
Reference in New Issue
Block a user