Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
E.h borders.c dialog.c draw.c ewin-ops.c ewins.c iconify.c
pager.c
Log Message:
Do shape propagation when needed.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.423
retrieving revision 1.424
diff -u -3 -r1.423 -r1.424
--- E.h 8 May 2005 09:52:25 -0000 1.423
+++ E.h 8 May 2005 16:01:23 -0000 1.424
@@ -1125,6 +1125,7 @@
/* Disable, but Keep around a bit longer */
#define USE_DQ_ICLASS 0
#define USE_DQ_TCLASS 0
+#define USE_DQ_SHAPE 0
typedef struct _drawqueue
{
@@ -1140,7 +1141,9 @@
TextClass *tclass;
char *text;
#endif
+#if USE_DQ_SHAPE
char shape_propagate;
+#endif
Pager *pager;
Pager *redraw_pager;
char newbg;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/borders.c,v
retrieving revision 1.257
retrieving revision 1.258
diff -u -3 -r1.257 -r1.258
--- borders.c 1 May 2005 11:27:34 -0000 1.257
+++ borders.c 8 May 2005 16:01:25 -0000 1.258
@@ -153,7 +153,6 @@
if (!ewin->shapedone || ewin->border->changes_shape)
EwinPropagateShapes(ewin);
- ewin->shapedone = 1;
}
void
@@ -173,7 +172,6 @@
if (do_shape || !ewin->shapedone || ewin->border->changes_shape)
EwinPropagateShapes(ewin);
- ewin->shapedone = 1;
if (queue_off)
Mode.queue_up = pq;
@@ -397,20 +395,10 @@
ewin->bits[i].no_expose = 1;
}
- if ((reshape) || (Mode.have_place_grab))
+ if (reshape)
{
- if (Mode.have_place_grab)
- {
- char pq;
-
- pq = Mode.queue_up;
- Mode.queue_up = 0;
- EwinPropagateShapes(ewin);
- Mode.queue_up = pq;
- }
- else
- EwinPropagateShapes(ewin);
- ewin->shapedone = 1;
+ ewin->shapedone = 0;
+ EwinPropagateShapes(ewin);
}
}
@@ -580,7 +568,6 @@
EMoveWindow(ewin->win_container, b->border.left, b->border.top);
EwinBorderCalcSizes(ewin);
- EwinPropagateShapes(ewin);
SnapshotEwinUpdate(ewin, SNAP_USE_BORDER);
}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/dialog.c,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -3 -r1.108 -r1.109
--- dialog.c 7 May 2005 11:19:56 -0000 1.108
+++ dialog.c 8 May 2005 16:01:44 -0000 1.109
@@ -642,7 +642,6 @@
else
ArrangeEwinCentered(ewin, 0);
}
- EwinPropagateShapes(ewin);
ShowEwin(ewin);
}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/draw.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -3 -r1.66 -r1.67
--- draw.c 7 May 2005 11:19:56 -0000 1.66
+++ draw.c 8 May 2005 16:01:45 -0000 1.67
@@ -57,7 +57,36 @@
{
already = 0;
- if (dq->shape_propagate)
+ if (dq->d)
+ {
+ for (i = 0; i < num; i++)
+ {
+ if ((lst[i]->d == dq->d) && DialogItem(dq->d) &&
+ /*(dq->d->item == dq->di) && */ (lst[i]->di == dq->di))
+ {
+ if (dq->x < lst[i]->x)
+ {
+ lst[i]->w += (lst[i]->x - dq->x);
+ lst[i]->x = dq->x;
+ }
+ if ((lst[i]->x + lst[i]->w) < (dq->x + dq->w))
+ lst[i]->w +=
+ (dq->x + dq->w) - (lst[i]->x + lst[i]->w);
+ if (dq->y < lst[i]->y)
+ {
+ lst[i]->h += (lst[i]->y - dq->y);
+ lst[i]->y = dq->y;
+ }
+ if ((lst[i]->y + lst[i]->h) < (dq->y + dq->h))
+ lst[i]->h +=
+ (dq->y + dq->h) - (lst[i]->y + lst[i]->h);
+ already = 1;
+ break;
+ }
+ }
+ }
+#if USE_DQ_SHAPE
+ else if (dq->shape_propagate)
{
for (i = 0; i < num; i++)
{
@@ -68,6 +97,7 @@
}
}
}
+#endif
#if USE_DQ_TCLASS
else if (dq->text)
{
@@ -106,34 +136,6 @@
}
}
}
- else if (dq->d)
- {
- for (i = 0; i < num; i++)
- {
- if ((lst[i]->d == dq->d) && DialogItem(dq->d) &&
- /*(dq->d->item == dq->di) && */ (lst[i]->di == dq->di))
- {
- if (dq->x < lst[i]->x)
- {
- lst[i]->w += (lst[i]->x - dq->x);
- lst[i]->x = dq->x;
- }
- if ((lst[i]->x + lst[i]->w) < (dq->x + dq->w))
- lst[i]->w +=
- (dq->x + dq->w) - (lst[i]->x + lst[i]->w);
- if (dq->y < lst[i]->y)
- {
- lst[i]->h += (lst[i]->y - dq->y);
- lst[i]->y = dq->y;
- }
- if ((lst[i]->y + lst[i]->h) < (dq->y + dq->h))
- lst[i]->h +=
- (dq->y + dq->h) - (lst[i]->y + lst[i]->h);
- already = 1;
- break;
- }
- }
- }
else if (dq->redraw_pager)
{
for (i = 0; i < num; i++)
@@ -203,12 +205,23 @@
for (i = num - 1; i >= 0; i--)
{
dq = lst[i];
- if (dq->shape_propagate)
+
+ if (dq->d)
+ {
+/* printf("D %x\n", dq->d->ewin->client.win); */
+ if (FindItem
+ ((char *)(dq->d), 0, LIST_FINDBY_POINTER,
+ LIST_TYPE_DIALOG))
+ DialogDrawItems(dq->d, dq->di, dq->x, dq->y, dq->w, dq->h);
+ }
+#if USE_DQ_SHAPE
+ else if (dq->shape_propagate)
{
/* printf("S %x\n", dq->win); */
if (WinExists(dq->win))
PropagateShapes(dq->win);
}
+#endif
#if USE_DQ_TCLASS
else if (dq->text)
{
@@ -238,14 +251,6 @@
LIST_TYPE_PAGER))
dq->func(dq);
}
- else if (dq->d)
- {
-/* printf("D %x\n", dq->d->ewin->client.win); */
- if (FindItem
- ((char *)(dq->d), 0, LIST_FINDBY_POINTER,
- LIST_TYPE_DIALOG))
- DialogDrawItems(dq->d, dq->di, dq->x, dq->y, dq->w, dq->h);
- }
else if (dq->redraw_pager)
{
/* printf("p %x\n", dq->win); */
@@ -1382,6 +1387,10 @@
XRectangle *rects = NULL, *rl = NULL;
XWindowAttributes att;
+#if 0
+ Eprintf("PropagateShapes(%d): %#lx\n", Mode.queue_up, win);
+#endif
+#if USE_DQ_SHAPE
if (Mode.queue_up)
{
DrawQueue *dq;
@@ -1392,7 +1401,10 @@
AddItem(dq, "DRAW", dq->win, LIST_TYPE_DRAW);
return;
}
- EGetGeometry(win, &rt, &x, &y, &w, &h, &d, &d);
+#endif
+
+ if (!EGetGeometry(win, &rt, &x, &y, &w, &h, &d, &d))
+ return;
if ((w <= 0) || (h <= 0))
return;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewin-ops.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -3 -r1.30 -r1.31
--- ewin-ops.c 7 May 2005 11:19:57 -0000 1.30
+++ ewin-ops.c 8 May 2005 16:01:46 -0000 1.31
@@ -800,7 +800,6 @@
EwinBorderCalcSizes(ewin);
ESync();
- EwinPropagateShapes(ewin);
Mode.queue_up = pq;
HintsSetWindowState(ewin);
@@ -866,7 +865,6 @@
MoveResizeEwin(ewin, x, y, ewin->client.w, ewin->client.h);
ESync();
- EwinPropagateShapes(ewin);
Mode.queue_up = pq;
HintsSetWindowState(ewin);
ModulesSignal(ESIGNAL_EWIN_CHANGE, ewin);
@@ -930,14 +928,13 @@
EMoveResizeWindow(ewin->win_container,
ewin->border->border.left,
ewin->border->border.top, ww, hh);
- EoMoveResize(ewin, x, y, w, h);
- EwinBorderCalcSizes(ewin);
if (ewin->client.shaped)
EShapeCombineShape(ewin->win_container,
ShapeBounding, -(ewin->client.w - ww),
0, ewin->client.win, ShapeBounding,
ShapeSet);
- EwinPropagateShapes(ewin);
+ EoMoveResize(ewin, x, y, w, h);
+ EwinBorderCalcSizes(ewin);
k = ETimedLoopNext();
}
@@ -970,13 +967,12 @@
EMoveResizeWindow(ewin->win_container,
ewin->border->border.left,
ewin->border->border.top, ww, hh);
- EoMoveResize(ewin, x, y, w, h);
- EwinBorderCalcSizes(ewin);
if (ewin->client.shaped)
EShapeCombineShape(ewin->win_container,
ShapeBounding, 0, 0, ewin->client.win,
ShapeBounding, ShapeSet);
- EwinPropagateShapes(ewin);
+ EoMoveResize(ewin, x, y, w, h);
+ EwinBorderCalcSizes(ewin);
k = ETimedLoopNext();
}
@@ -1006,15 +1002,14 @@
EMoveResizeWindow(ewin->win_container,
ewin->border->border.left,
ewin->border->border.top, ww, hh);
- EoMoveResize(ewin, x, y, w, h);
- EwinBorderCalcSizes(ewin);
if (ewin->client.shaped)
EShapeCombineShape(ewin->win_container,
ShapeBounding, 0,
-(ewin->client.h - hh),
ewin->client.win, ShapeBounding,
ShapeSet);
- EwinPropagateShapes(ewin);
+ EoMoveResize(ewin, x, y, w, h);
+ EwinBorderCalcSizes(ewin);
k = ETimedLoopNext();
}
@@ -1048,13 +1043,13 @@
EMoveResizeWindow(ewin->win_container,
ewin->border->border.left,
ewin->border->border.top, ww, hh);
- EoMoveResize(ewin, x, y, w, h);
- EwinBorderCalcSizes(ewin);
if (ewin->client.shaped)
EShapeCombineShape(ewin->win_container,
ShapeBounding, 0, 0, ewin->client.win,
ShapeBounding, ShapeSet);
- EwinPropagateShapes(ewin);
+ EoMoveResize(ewin, x, y, w, h);
+ EwinBorderCalcSizes(ewin);
+
k = ETimedLoopNext();
}
}
@@ -1064,7 +1059,9 @@
ewin->shaded = 2;
EMoveResizeWindow(ewin->win_container, -30, -30, 1, 1);
- EwinBorderCalcSizes(ewin);
+ if (ewin->client.shaped)
+ EShapeCombineShape(ewin->win_container, ShapeBounding, 0, 0,
+ ewin->client.win, ShapeBounding, ShapeSet);
MoveEwin(ewin, EoGetX(ewin), EoGetY(ewin));
ESync();
@@ -1073,11 +1070,6 @@
Eprintf("EwinShade-E\n");
#endif
- if (ewin->client.shaped)
- EShapeCombineShape(ewin->win_container, ShapeBounding, 0, 0,
- ewin->client.win, ShapeBounding, ShapeSet);
- EwinPropagateShapes(ewin);
-
Mode.queue_up = pq;
HintsSetWindowState(ewin);
@@ -1142,8 +1134,6 @@
ewin->border->border.top,
w - ewin->border->border.left -
ewin->border->border.right, ewin->client.h);
- EoMoveResize(ewin, x, y, w, h);
- EwinBorderCalcSizes(ewin);
if (ewin->client.shaped)
EShapeCombineShape(ewin->win_container,
ShapeBounding,
@@ -1153,7 +1143,8 @@
ewin->border->border.right)), 0,
ewin->client.win, ShapeBounding,
ShapeSet);
- EwinPropagateShapes(ewin);
+ EoMoveResize(ewin, x, y, w, h);
+ EwinBorderCalcSizes(ewin);
k = ETimedLoopNext();
}
@@ -1191,13 +1182,12 @@
ewin->border->border.top,
w - ewin->border->border.left -
ewin->border->border.right, ewin->client.h);
- EoMoveResize(ewin, x, y, w, h);
- EwinBorderCalcSizes(ewin);
if (ewin->client.shaped)
EShapeCombineShape(ewin->win_container,
ShapeBounding, 0, 0, ewin->client.win,
ShapeBounding, ShapeSet);
- EwinPropagateShapes(ewin);
+ EoMoveResize(ewin, x, y, w, h);
+ EwinBorderCalcSizes(ewin);
k = ETimedLoopNext();
}
@@ -1231,8 +1221,6 @@
ewin->border->border.top, ewin->client.w,
h - ewin->border->border.top -
ewin->border->border.bottom);
- EoMoveResize(ewin, x, y, w, h);
- EwinBorderCalcSizes(ewin);
if (ewin->client.shaped)
EShapeCombineShape(ewin->win_container,
ShapeBounding, 0,
@@ -1242,7 +1230,8 @@
ewin->border->border.bottom)),
ewin->client.win, ShapeBounding,
ShapeSet);
- EwinPropagateShapes(ewin);
+ EoMoveResize(ewin, x, y, w, h);
+ EwinBorderCalcSizes(ewin);
k = ETimedLoopNext();
}
@@ -1280,13 +1269,12 @@
ewin->border->border.top, ewin->client.w,
h - ewin->border->border.top -
ewin->border->border.bottom);
- EoMoveResize(ewin, x, y, w, h);
- EwinBorderCalcSizes(ewin);
if (ewin->client.shaped)
EShapeCombineShape(ewin->win_container,
ShapeBounding, 0, 0, ewin->client.win,
ShapeBounding, ShapeSet);
- EwinPropagateShapes(ewin);
+ EoMoveResize(ewin, x, y, w, h);
+ EwinBorderCalcSizes(ewin);
k = ETimedLoopNext();
}
@@ -1299,6 +1287,10 @@
att.win_gravity = NorthWestGravity;
EChangeWindowAttributes(ewin->client.win, CWWinGravity, &att);
+ if (ewin->client.shaped)
+ EShapeCombineShape(ewin->win_container, ShapeBounding, 0, 0,
+ ewin->client.win, ShapeBounding, ShapeSet);
+
MoveResizeEwin(ewin, EoGetX(ewin), EoGetY(ewin), ewin->client.w,
ewin->client.h);
ESync();
@@ -1308,11 +1300,6 @@
Eprintf("EwinUnShade-E\n");
#endif
- if (ewin->client.shaped)
- EShapeCombineShape(ewin->win_container, ShapeBounding, 0, 0,
- ewin->client.win, ShapeBounding, ShapeSet);
- EwinPropagateShapes(ewin);
-
Mode.queue_up = pq;
HintsSetWindowState(ewin);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewins.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -3 -r1.58 -r1.59
--- ewins.c 8 May 2005 09:52:26 -0000 1.58
+++ ewins.c 8 May 2005 16:01:46 -0000 1.59
@@ -492,8 +492,22 @@
void
EwinPropagateShapes(EWin * ewin)
{
- if (!ewin->docked)
- PropagateShapes(EoGetWin(ewin));
+ if (!EoIsShown(ewin))
+ return;
+
+ if (ewin->docked)
+ return;
+
+#if 0
+ Eprintf("EwinPropagateShapes %#lx %#lx %s\n", EoGetWin(ewin),
+ ewin->client.win, EoGetName(ewin));
+#endif
+ if (!ewin->shapedone)
+ {
+ PropagateShapes(EoGetWin(ewin));
+ EoChangeShape(ewin);
+ ewin->shapedone = 1;
+ }
}
static void
@@ -1393,6 +1407,13 @@
EMapWindow(ewin->client.win);
}
+ if (!ewin->shapedone)
+ {
+ ewin->o.shown = 1;
+ EwinPropagateShapes(ewin);
+ ewin->o.shown = 0;
+ }
+
EoMap(ewin, 0);
}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/iconify.c,v
retrieving revision 1.142
retrieving revision 1.143
diff -u -3 -r1.142 -r1.143
--- iconify.c 7 May 2005 11:19:59 -0000 1.142
+++ iconify.c 8 May 2005 16:01:46 -0000 1.143
@@ -1969,9 +1969,9 @@
PropagateShapes(ib->icon_win);
PropagateShapes(ib->win);
ICCCM_GetShapeInfo(ib->ewin);
- EwinPropagateShapes(ib->ewin);
if (ib->nobg)
- EoChangeShape(ib->ewin);
+ ib->ewin->shapedone = 0;
+ EwinPropagateShapes(ib->ewin);
Mode.queue_up = pq;
}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/pager.c,v
retrieving revision 1.134
retrieving revision 1.135
diff -u -3 -r1.134 -r1.135
--- pager.c 7 May 2005 11:19:59 -0000 1.134
+++ pager.c 8 May 2005 16:01:48 -0000 1.135
@@ -686,7 +686,6 @@
h);
}
PagerRedraw(p, 1);
- EwinPropagateShapes(ewin);
/* show the pager ewin */
ShowEwin(ewin);
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs