summaryrefslogtreecommitdiff
path: root/src/lib/evas
diff options
context:
space:
mode:
authorRafael Antognolli <rafael.antognolli@intel.com>2013-04-26 19:34:35 -0300
committerRafael Antognolli <rafael.antognolli@intel.com>2013-04-29 11:29:43 -0300
commit550bc6ca48bb80e81d37e94a6fa9b4e1edf7e99e (patch)
tree7b9e6cedb4c27c0f6bf7d26feeca57cca4c9ba78 /src/lib/evas
parent4268bf99611ca31e5a4236210f8a8acb1c4923fb (diff)
evas/framespace: Remove framespace offset from position set/get.
Objects won't be moved by the framespace offset anymore.
Diffstat (limited to 'src/lib/evas')
-rw-r--r--src/lib/evas/canvas/evas_layer.c11
-rw-r--r--src/lib/evas/canvas/evas_object_main.c36
2 files changed, 6 insertions, 41 deletions
diff --git a/src/lib/evas/canvas/evas_layer.c b/src/lib/evas/canvas/evas_layer.c
index b2749d1..38a0c9e 100644
--- a/src/lib/evas/canvas/evas_layer.c
+++ b/src/lib/evas/canvas/evas_layer.c
@@ -22,17 +22,6 @@ evas_object_inject(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *
22 lay->usage++; 22 lay->usage++;
23 obj->layer = lay; 23 obj->layer = lay;
24 obj->in_layer = 1; 24 obj->in_layer = 1;
25
26 if (obj->cur->geometry.x == obj->layer->evas->framespace.x &&
27 obj->cur->geometry.y == obj->layer->evas->framespace.y)
28 return ;
29
30 EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur)
31 {
32 state_write->geometry.x = obj->layer->evas->framespace.x;
33 state_write->geometry.y = obj->layer->evas->framespace.y;
34 }
35 EINA_COW_STATE_WRITE_END(obj, state_write, cur);
36} 25}
37 26
38void 27void
diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c
index bc18b7f..87eb903 100644
--- a/src/lib/evas/canvas/evas_object_main.c
+++ b/src/lib/evas/canvas/evas_object_main.c
@@ -676,23 +676,13 @@ _position_set(Eo *eo_obj, void *_pd, va_list *list)
676 Eina_Bool is, was = EINA_FALSE; 676 Eina_Bool is, was = EINA_FALSE;
677 Eina_Bool pass = EINA_FALSE, freeze = EINA_FALSE; 677 Eina_Bool pass = EINA_FALSE, freeze = EINA_FALSE;
678 Eina_Bool source_invisible = EINA_FALSE; 678 Eina_Bool source_invisible = EINA_FALSE;
679 int nx, ny;
680 679
681 if (obj->delete_me) return; 680 if (obj->delete_me) return;
682 if (!obj->layer) return; 681 if (!obj->layer) return;
683
684 nx = x;
685 ny = y;
686 682
687 evas = obj->layer->evas; 683 evas = obj->layer->evas;
688 684
689 if ((!obj->is_frame) && (eo_obj != evas->framespace.clip)) 685 if (evas_object_intercept_call_move(eo_obj, obj, x, y)) return;
690 {
691 nx += evas->framespace.x;
692 ny += evas->framespace.y;
693 }
694
695 if (evas_object_intercept_call_move(eo_obj, obj, nx, ny)) return;
696 686
697 if (obj->doing.in_move > 0) 687 if (obj->doing.in_move > 0)
698 { 688 {
@@ -700,7 +690,7 @@ _position_set(Eo *eo_obj, void *_pd, va_list *list)
700 return; 690 return;
701 } 691 }
702 692
703 if ((obj->cur->geometry.x == nx) && (obj->cur->geometry.y == ny)) return; 693 if ((obj->cur->geometry.x == x) && (obj->cur->geometry.y == y)) return;
704 694
705 if (!(obj->layer->evas->is_frozen)) 695 if (!(obj->layer->evas->is_frozen))
706 { 696 {
@@ -721,8 +711,8 @@ _position_set(Eo *eo_obj, void *_pd, va_list *list)
721 711
722 EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur) 712 EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur)
723 { 713 {
724 state_write->geometry.x = nx; 714 state_write->geometry.x = x;
725 state_write->geometry.y = ny; 715 state_write->geometry.y = y;
726 } 716 }
727 EINA_COW_STATE_WRITE_END(obj, state_write, cur); 717 EINA_COW_STATE_WRITE_END(obj, state_write, cur);
728 718
@@ -858,9 +848,6 @@ evas_object_geometry_get(const Evas_Object *eo_obj, Evas_Coord *x, Evas_Coord *y
858static void 848static void
859_position_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list) 849_position_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list)
860{ 850{
861 Evas_Public_Data *evas;
862 int nx = 0, ny = 0;
863
864 const Evas_Object_Protected_Data *obj = _pd; 851 const Evas_Object_Protected_Data *obj = _pd;
865 852
866 Evas_Coord *x = va_arg(*list, Evas_Coord *); 853 Evas_Coord *x = va_arg(*list, Evas_Coord *);
@@ -872,19 +859,8 @@ _position_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list)
872 return; 859 return;
873 } 860 }
874 861
875 nx = obj->cur->geometry.x; 862 if (x) *x = obj->cur->geometry.x;
876 ny = obj->cur->geometry.y; 863 if (y) *y = obj->cur->geometry.y;
877
878 evas = obj->layer->evas;
879
880 if ((!obj->is_frame) && (eo_obj != evas->framespace.clip))
881 {
882 nx -= evas->framespace.x;
883 ny -= evas->framespace.y;
884 }
885
886 if (x) *x = nx;
887 if (y) *y = ny;
888} 864}
889 865
890static void 866static void