summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2005-07-30 09:52:53 +0000
committerCarsten Haitzler <raster@rasterman.com>2005-07-30 09:52:53 +0000
commitee18abd342b1eac990dda645564e818070fcb354 (patch)
treee7612b603429e3faa83c0c8d3f76cb6d848978fd
parentcf3732d8b98f74b100806fccce3b6aecdf4ef952 (diff)
engage seems to be generating clip weirdness - testing to see if the clip
changes are it - catalyst? :) does it work now? SVN revision: 15957
-rw-r--r--legacy/evas/src/lib/canvas/evas_clip.c33
-rw-r--r--legacy/evas/src/lib/canvas/evas_events.c6
-rw-r--r--legacy/evas/src/lib/canvas/evas_object_main.c19
3 files changed, 22 insertions, 36 deletions
diff --git a/legacy/evas/src/lib/canvas/evas_clip.c b/legacy/evas/src/lib/canvas/evas_clip.c
index 5a1f12f..7c93e05 100644
--- a/legacy/evas/src/lib/canvas/evas_clip.c
+++ b/legacy/evas/src/lib/canvas/evas_clip.c
@@ -6,14 +6,9 @@ evas_object_clip_recalc(Evas_Object *obj)
6{ 6{
7 int cx, cy, cw, ch, cvis, cr, cg, cb, ca; 7 int cx, cy, cw, ch, cvis, cr, cg, cb, ca;
8 int nx, ny, nw, nh, nvis, nr, ng, nb, na; 8 int nx, ny, nw, nh, nvis, nr, ng, nb, na;
9 // FIXME: This shouldn't be necessary as frozen checks should happen at a
10 // higher level.
11 // if (obj->layer->evas->events_frozen > 0) return;
12 9
13 /* Skip coord recalc on smart object and invalid output */ 10 if (obj->layer->evas->events_frozen > 0) return;
14 if ((!obj->smart.smart) && 11 evas_object_coords_recalc(obj);
15 (obj->cur.cache.geometry.validity != obj->layer->evas->output_validity))
16 evas_object_coords_recalc(obj);
17 cx = obj->cur.cache.geometry.x; cy = obj->cur.cache.geometry.y; 12 cx = obj->cur.cache.geometry.x; cy = obj->cur.cache.geometry.y;
18 cw = obj->cur.cache.geometry.w; ch = obj->cur.cache.geometry.h; 13 cw = obj->cur.cache.geometry.w; ch = obj->cur.cache.geometry.h;
19 if (obj->cur.color.a == 0) cvis = 0; 14 if (obj->cur.color.a == 0) cvis = 0;
@@ -22,8 +17,8 @@ evas_object_clip_recalc(Evas_Object *obj)
22 cb = obj->cur.color.b; ca = obj->cur.color.a; 17 cb = obj->cur.color.b; ca = obj->cur.color.a;
23 if (obj->cur.clipper) 18 if (obj->cur.clipper)
24 { 19 {
25 /* Don't recalculate clean clipper */ 20// this causes problems... hmmm
26 if (obj->cur.clipper->cur.cache.clip.dirty) 21// if (obj->cur.clipper->cur.cache.clip.dirty)
27 evas_object_clip_recalc(obj->cur.clipper); 22 evas_object_clip_recalc(obj->cur.clipper);
28 nx = obj->cur.clipper->cur.cache.clip.x; 23 nx = obj->cur.clipper->cur.cache.clip.x;
29 ny = obj->cur.clipper->cur.cache.clip.y; 24 ny = obj->cur.clipper->cur.cache.clip.y;
@@ -52,12 +47,6 @@ evas_object_clip_recalc(Evas_Object *obj)
52 obj->cur.cache.clip.b = cb; 47 obj->cur.cache.clip.b = cb;
53 obj->cur.cache.clip.a = ca; 48 obj->cur.cache.clip.a = ca;
54 obj->cur.cache.clip.dirty = 0; 49 obj->cur.cache.clip.dirty = 0;
55 if (cvis)
56 {
57 Evas_List *l;
58 for (l = obj->clip.clipees; l; l = l->next)
59 evas_object_clip_dirty(l->data);
60 }
61} 50}
62 51
63void 52void
@@ -66,6 +55,8 @@ evas_object_clip_dirty(Evas_Object *obj)
66 Evas_List *l; 55 Evas_List *l;
67 56
68 obj->cur.cache.clip.dirty = 1; 57 obj->cur.cache.clip.dirty = 1;
58 for (l = obj->clip.clipees; l; l = l->next)
59 evas_object_clip_dirty(l->data);
69} 60}
70 61
71void 62void
@@ -73,10 +64,10 @@ evas_object_recalc_clippees(Evas_Object *obj)
73{ 64{
74 Evas_List *l; 65 Evas_List *l;
75 66
76 evas_object_clip_recalc(obj); 67 if (obj->cur.cache.clip.dirty)
77 for (l = obj->clip.clipees; l; l = l->next)
78 { 68 {
79 if (obj->cur.cache.clip.dirty) 69 evas_object_clip_recalc(obj);
70 for (l = obj->clip.clipees; l; l = l->next)
80 evas_object_recalc_clippees(l->data); 71 evas_object_recalc_clippees(l->data);
81 } 72 }
82} 73}
@@ -202,8 +193,7 @@ evas_object_clip_set(Evas_Object *obj, Evas_Object *clip)
202 clip->clip.clipees = evas_list_append(clip->clip.clipees, obj); 193 clip->clip.clipees = evas_list_append(clip->clip.clipees, obj);
203 evas_object_change(obj); 194 evas_object_change(obj);
204 evas_object_clip_dirty(obj); 195 evas_object_clip_dirty(obj);
205 if ((!obj->layer->evas->events_frozen) && (obj->cur.cache.clip.dirty)) 196 evas_object_recalc_clippees(obj);
206 evas_object_recalc_clippees(obj);
207 if (!obj->smart.smart) 197 if (!obj->smart.smart)
208 { 198 {
209 if (evas_object_is_in_output_rect(obj, 199 if (evas_object_is_in_output_rect(obj,
@@ -291,8 +281,7 @@ evas_object_clip_unset(Evas_Object *obj)
291 obj->cur.clipper = NULL; 281 obj->cur.clipper = NULL;
292 evas_object_change(obj); 282 evas_object_change(obj);
293 evas_object_clip_dirty(obj); 283 evas_object_clip_dirty(obj);
294 if (!obj->layer->evas->events_frozen && obj->cur.cache.clip.dirty) 284 evas_object_recalc_clippees(obj);
295 evas_object_recalc_clippees(obj);
296 if (!obj->smart.smart) 285 if (!obj->smart.smart)
297 { 286 {
298 if (evas_object_is_in_output_rect(obj, 287 if (evas_object_is_in_output_rect(obj,
diff --git a/legacy/evas/src/lib/canvas/evas_events.c b/legacy/evas/src/lib/canvas/evas_events.c
index 44edcc7..230dbe2 100644
--- a/legacy/evas/src/lib/canvas/evas_events.c
+++ b/legacy/evas/src/lib/canvas/evas_events.c
@@ -40,6 +40,8 @@ evas_event_objects_event_list(Evas *e, Evas_Object *stop, int x, int y)
40 if (obj == stop) goto done; 40 if (obj == stop) goto done;
41 if ((!evas_event_passes_through(obj)) && (!obj->smart.smart)) 41 if ((!evas_event_passes_through(obj)) && (!obj->smart.smart))
42 { 42 {
43// FIXME: i don't think we need this
44// evas_object_clip_recalc(obj);
43 if ((evas_object_is_in_output_rect(obj, x, y, 1, 1)) && 45 if ((evas_object_is_in_output_rect(obj, x, y, 1, 1)) &&
44 (obj->cur.visible) && 46 (obj->cur.visible) &&
45 (obj->delete_me == 0) && 47 (obj->delete_me == 0) &&
@@ -138,8 +140,8 @@ evas_event_thaw(Evas *e)
138 Evas_Object *obj; 140 Evas_Object *obj;
139 141
140 obj = (Evas_Object *)l2; 142 obj = (Evas_Object *)l2;
141 if (obj->cur.cache.clip.dirty) 143 evas_object_clip_recalc(obj);
142 evas_object_recalc_clippees(obj); 144 evas_object_recalc_clippees(obj);
143 } 145 }
144 } 146 }
145 } 147 }
diff --git a/legacy/evas/src/lib/canvas/evas_object_main.c b/legacy/evas/src/lib/canvas/evas_object_main.c
index 4656dbc..da120eb 100644
--- a/legacy/evas/src/lib/canvas/evas_object_main.c
+++ b/legacy/evas/src/lib/canvas/evas_object_main.c
@@ -275,10 +275,9 @@ evas_object_render_pre_effect_updates(Evas_List *updates, Evas_Object *obj, int
275void 275void
276evas_object_coords_recalc(Evas_Object *obj) 276evas_object_coords_recalc(Evas_Object *obj)
277{ 277{
278 // FIXME: Check before entering 278 if (obj->smart.smart) return;
279 // if (obj->smart.smart) return; 279 if (obj->cur.cache.geometry.validity == obj->layer->evas->output_validity)
280 // if (obj->cur.cache.geometry.validity == obj->layer->evas->output_validity) 280 return;
281 // return;
282 obj->cur.cache.geometry.x = 281 obj->cur.cache.geometry.x =
283 evas_coord_world_x_to_screen(obj->layer->evas, obj->cur.geometry.x); 282 evas_coord_world_x_to_screen(obj->layer->evas, obj->cur.geometry.x);
284 obj->cur.cache.geometry.y = 283 obj->cur.cache.geometry.y =
@@ -483,6 +482,7 @@ evas_object_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
483 evas_object_clip_dirty(obj); 482 evas_object_clip_dirty(obj);
484 if (obj->layer->evas->events_frozen != 0) 483 if (obj->layer->evas->events_frozen != 0)
485 { 484 {
485 evas_object_recalc_clippees(obj);
486 if (!pass) 486 if (!pass)
487 { 487 {
488 if (!obj->smart.smart) 488 if (!obj->smart.smart)
@@ -499,8 +499,6 @@ evas_object_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
499 } 499 }
500 } 500 }
501 } 501 }
502 else if (obj->cur.cache.clip.dirty)
503 evas_object_recalc_clippees(obj);
504 evas_object_inform_call_move(obj); 502 evas_object_inform_call_move(obj);
505} 503}
506 504
@@ -546,6 +544,7 @@ evas_object_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
546 obj->cur.cache.geometry.validity = 0; 544 obj->cur.cache.geometry.validity = 0;
547 evas_object_change(obj); 545 evas_object_change(obj);
548 evas_object_clip_dirty(obj); 546 evas_object_clip_dirty(obj);
547 evas_object_recalc_clippees(obj);
549 if (obj->layer->evas->events_frozen != 0) 548 if (obj->layer->evas->events_frozen != 0)
550 { 549 {
551 // if (obj->func->coords_recalc) obj->func->coords_recalc(obj); 550 // if (obj->func->coords_recalc) obj->func->coords_recalc(obj);
@@ -565,8 +564,6 @@ evas_object_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
565 } 564 }
566 } 565 }
567 } 566 }
568 else if (obj->cur.cache.clip.dirty)
569 evas_object_recalc_clippees(obj);
570 evas_object_inform_call_resize(obj); 567 evas_object_inform_call_resize(obj);
571} 568}
572 569
@@ -639,6 +636,7 @@ evas_object_show(Evas_Object *obj)
639 evas_object_clip_dirty(obj); 636 evas_object_clip_dirty(obj);
640 if (obj->layer->evas->events_frozen != 0) 637 if (obj->layer->evas->events_frozen != 0)
641 { 638 {
639 evas_object_recalc_clippees(obj);
642 if (!evas_event_passes_through(obj)) 640 if (!evas_event_passes_through(obj))
643 { 641 {
644 if (!obj->smart.smart) 642 if (!obj->smart.smart)
@@ -654,8 +652,6 @@ evas_object_show(Evas_Object *obj)
654 } 652 }
655 } 653 }
656 } 654 }
657 else if (obj->cur.cache.clip.dirty)
658 evas_object_recalc_clippees(obj);
659 evas_object_inform_call_show(obj); 655 evas_object_inform_call_show(obj);
660} 656}
661 657
@@ -687,6 +683,7 @@ evas_object_hide(Evas_Object *obj)
687 evas_object_clip_dirty(obj); 683 evas_object_clip_dirty(obj);
688 if (obj->layer->evas->events_frozen != 0) 684 if (obj->layer->evas->events_frozen != 0)
689 { 685 {
686 evas_object_recalc_clippees(obj);
690 if (!evas_event_passes_through(obj)) 687 if (!evas_event_passes_through(obj))
691 { 688 {
692 if (!obj->smart.smart) 689 if (!obj->smart.smart)
@@ -734,8 +731,6 @@ evas_object_hide(Evas_Object *obj)
734 } 731 }
735 } 732 }
736 } 733 }
737 else if (obj->cur.cache.clip.dirty)
738 evas_object_recalc_clippees(obj);
739 evas_object_inform_call_hide(obj); 734 evas_object_inform_call_hide(obj);
740} 735}
741 736