From a5e7339ac84ebed7605cb669a6dc1d422746fa7e Mon Sep 17 00:00:00 2001 From: WooHyun Jung Date: Mon, 25 Mar 2019 08:52:10 -0400 Subject: [PATCH] elm_entry: fix a bug in moving the magnifier Summary: When moving the magnifier in elm_entry, _magnifier_move function occured infinite loop problem by calling evas_object_move twice with different positions. So, I changed it to call evas_object_move once. ref T7202 Test Plan: 1. Set profile to "mobile" 2. elementary_test 3. entry 4. long press mouse button on elm_entry 5. when the magnifier is shown, try to move it Reviewers: zmike, bu5hm4n, bowonryu, id213sin Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7202 Differential Revision: https://phab.enlightenment.org/D8462 --- src/lib/elementary/elm_entry.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c index 451d877..96f004b 100644 --- a/src/lib/elementary/elm_entry.c +++ b/src/lib/elementary/elm_entry.c @@ -2471,9 +2471,8 @@ _magnifier_move(void *data) cx += ex; cy += ey; - //Move the Magnifier + // calculate the position of the magnifier edje_object_parts_extends_calc(sd->mgf_bg, &x, &y, &w, &h); - evas_object_move(sd->mgf_bg, cx - x - (w / 2), cy - y - h); mx = cx - x - (w / 2); my = cy - y - h; @@ -2500,9 +2499,11 @@ _magnifier_move(void *data) my = 0; if (my + mh > wh) my = wh - mh; - evas_object_move(sd->mgf_bg, mx, my); } + // move the magnifier to the proper position + evas_object_move(sd->mgf_bg, mx, my); + //Set the Proxy Render Area evas_object_geometry_get(data, &x, &y, &w, &h); evas_object_geometry_get(sd->mgf_proxy, &px, &py, &pw, &ph); -- 2.7.4