Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
x.c
Log Message:
Speed up shape propagation.
===================================================================
RCS file: /cvs/e/e16/e/src/x.c,v
retrieving revision 1.142
retrieving revision 1.143
diff -u -3 -r1.142 -r1.143
--- x.c 21 May 2006 18:44:18 -0000 1.142
+++ x.c 24 May 2006 16:36:47 -0000 1.143
@@ -1266,12 +1266,10 @@
{
EXID *xid = win;
EXID *xch;
- Window rt, par, *list = NULL;
- unsigned int i, num, num_rects;
+ unsigned int num_rects;
int k, rn;
int x, y, w, h;
XRectangle *rects, *rl;
- XWindowAttributes att;
if (!xid || xid->w <= 0 || xid->h <= 0)
return 0;
@@ -1281,25 +1279,20 @@
xid->x, xid->y, xid->w, xid->h);
#endif
- XQueryTree(disp, xid->xwin, &rt, &par, &list, &num);
- if (!list)
- return 0;
-
num_rects = 0;
rects = NULL;
/* go through all child windows and create/inset spans */
- for (i = 0; i < num; i++)
+ for (xch = xid_first; xch; xch = xch->next)
{
- xch = EXidLookup(list[i]);
- if (!xch)
- continue; /* Should never happen */
- XGetWindowAttributes(disp, list[i], &att);
+ if (xch->parent != xid)
+ continue;
+
#if DEBUG_SHAPE_PROPAGATE > 1
- Eprintf("%3d %#lx(%d): %4d,%4d %4dx%4d\n", i, list[i], att.map_state,
- att.x, att.y, att.width, att.height);
+ Eprintf("%#lx(%d): %4d,%4d %4dx%4d\n", xch->xwin, xch->mapped,
+ xch->x, xch->y, xch->w, xch->h);
#endif
- if ((att.class != InputOutput) || (att.map_state == IsUnmapped))
+ if (!xch->mapped)
continue;
x = xch->x;
@@ -1344,9 +1337,8 @@
num_rects++;
}
}
- XFree(list);
-#if DEBUG_SHAPE_PROPAGATE > 1
+#if DEBUG_SHAPE_PROPAGATE
Eprintf("EShapePropagate %#lx nr=%d\n", win, num_rects);
for (i = 0; i < num_rects; i++)
Eprintf("%3d %4d,%4d %4dx%4d\n", i, rects[i].x, rects[i].y,
-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs