summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_win.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-09-13 16:49:04 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-09-13 18:03:34 +0900
commit13da5e980eb43288b9b9f502cb6a7a000e1f26ea (patch)
treee37670643988bb990b3101257332c490a2e21131 /src/lib/elementary/efl_ui_win.c
parent0c46fc71033edda92f4e86b86f6d1d62751f8998 (diff)
efl_gfx: Use Eina.Rectangle for geometry (EO)
This saves a few lines already (without even having the proper helpers for stack rectangles).
Diffstat (limited to '')
-rw-r--r--src/lib/elementary/efl_ui_win.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 3d0a2d6f09..69401220f4 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -1037,26 +1037,25 @@ static void
1037_elm_win_focus_highlight_anim_setup(Efl_Ui_Win_Data *sd, 1037_elm_win_focus_highlight_anim_setup(Efl_Ui_Win_Data *sd,
1038 Evas_Object *obj) 1038 Evas_Object *obj)
1039{ 1039{
1040 Eina_Rectangle rt; 1040 Eina_Rectangle rt, rp;
1041 Evas_Coord px, py, pw, ph;
1042 Edje_Message_Int_Set *m; 1041 Edje_Message_Int_Set *m;
1043 Evas_Object *target = sd->focus_highlight.cur.target; 1042 Evas_Object *target = sd->focus_highlight.cur.target;
1044 1043
1045 evas_object_geometry_get(obj, &px, &py, &pw, &ph); 1044 rp = efl_gfx_geometry_get(obj);
1046 rt = elm_widget_focus_highlight_geometry_get(target); 1045 rt = elm_widget_focus_highlight_geometry_get(target);
1047 efl_gfx_geometry_set(obj, rt.x, rt.y, rt.w, rt.h); 1046 efl_gfx_geometry_set(obj, rt);
1048 1047
1049 if ((px == rt.x) && (py == rt.y) && (pw == rt.w) && (ph == rt.h)) return; 1048 if (eina_rectangle_equal(&rp, &rt)) return;
1050 1049
1051 if (!_elm_config->focus_highlight_clip_disable) 1050 if (!_elm_config->focus_highlight_clip_disable)
1052 evas_object_clip_unset(obj); 1051 evas_object_clip_unset(obj);
1053 1052
1054 m = alloca(sizeof(*m) + (sizeof(int) * 8)); 1053 m = alloca(sizeof(*m) + (sizeof(int) * 8));
1055 m->count = 8; 1054 m->count = 8;
1056 m->val[0] = px - rt.x; 1055 m->val[0] = rp.x - rt.x;
1057 m->val[1] = py - rt.y; 1056 m->val[1] = rp.y - rt.y;
1058 m->val[2] = pw; 1057 m->val[2] = rp.w;
1059 m->val[3] = ph; 1058 m->val[3] = rp.h;
1060 m->val[4] = 0; 1059 m->val[4] = 0;
1061 m->val[5] = 0; 1060 m->val[5] = 0;
1062 m->val[6] = rt.w; 1061 m->val[6] = rt.w;
@@ -1069,10 +1068,8 @@ _elm_win_focus_highlight_simple_setup(Efl_Ui_Win_Data *sd,
1069 Evas_Object *obj) 1068 Evas_Object *obj)
1070{ 1069{
1071 Evas_Object *clip, *target = sd->focus_highlight.cur.target; 1070 Evas_Object *clip, *target = sd->focus_highlight.cur.target;
1072 Eina_Rectangle r;
1073 1071
1074 r = elm_widget_focus_highlight_geometry_get(target); 1072 efl_gfx_geometry_set(obj, elm_widget_focus_highlight_geometry_get(target));
1075 efl_gfx_geometry_set(obj, r.x, r.y, r.w, r.h);
1076 1073
1077 if (!_elm_config->focus_highlight_clip_disable) 1074 if (!_elm_config->focus_highlight_clip_disable)
1078 { 1075 {