forked from enlightenment/efl
[Elm_Entry] Fix bug: magnifier position is incorrect when mouse down on selection handler
Summary: Magnifier is displayed incorrectly when mouse down on selection handler Reproduce way: Right click on entry (eg Entry), choose Select, select some text, press left mouse on selection handler (do not move the mouse), take a look at magnifier position. Reason: Magnifier position is set to mouse down position in entry. Fix: Check mouse down status and place correct position for magnifier. Reviewers: seoz, Hermet Reviewed By: Hermet Differential Revision: https://phab.enlightenment.org/D573
This commit is contained in:
parent
aba69c4c5f
commit
8f92069a63
|
@ -1442,7 +1442,19 @@ static void
|
|||
_magnifier_proxy_update(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
ELM_ENTRY_DATA_GET(data, sd);
|
||||
_magnifier_move(data, sd->downx, sd->downy);
|
||||
if ((sd->start_handler_down) || (sd->end_handler_down))
|
||||
{
|
||||
Evas_Coord ex, ey, cx, cy, ch;
|
||||
|
||||
evas_object_geometry_get(sd->entry_edje, &ex, &ey, NULL, NULL);
|
||||
edje_object_part_text_cursor_geometry_get(sd->entry_edje, "elm.text",
|
||||
&cx, &cy, NULL, &ch);
|
||||
_magnifier_move(data, ex + cx, ey + cy + (ch / 2));
|
||||
}
|
||||
else
|
||||
{
|
||||
_magnifier_move(data, sd->downx, sd->downy);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue