Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
eobj.c eobj.h ewins.c ipc.c warp.c x.c xwin.h
Log Message:
Track top-level window shepedness.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/eobj.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -3 -r1.63 -r1.64
--- eobj.c 14 Jan 2006 14:30:51 -0000 1.63
+++ eobj.c 22 Jan 2006 18:25:39 -0000 1.64
@@ -112,6 +112,7 @@
EobjSetLayer(eo, eo->layer);
}
+#if 1 /* FIXME - Remove */
int
EobjIsShaped(const EObj * eo)
{
@@ -123,6 +124,7 @@
return ((EWin *) eo)->state.shaped;
}
}
+#endif
void
EobjInit(EObj * eo, int type, Window win, int x, int y, int w, int h,
@@ -148,6 +150,7 @@
eo->y = y;
eo->w = w;
eo->h = h;
+ eo->shaped = -1;
if (type == EOBJ_TYPE_EXT)
eo->name = ecore_x_icccm_title_get(win);
@@ -277,6 +280,7 @@
#if 1 /* FIXME - TBD */
if (type == EOBJ_TYPE_EXT)
{
+ eo->shaped = 0; /* FIXME - Assume unshaped for now */
EobjSetFloating(eo, 1);
EobjSetLayer(eo, 4);
}
@@ -311,6 +315,9 @@
if (eo->stacked <= 0 || raise > 1)
DeskRestack(eo->desk);
+ if (eo->shaped < 0)
+ EobjShapeUpdate(eo, 0);
+
EMapWindow(eo->win);
#if USE_COMPOSITE
ECompMgrWinMap(eo);
@@ -442,13 +449,22 @@
}
void
-EobjChangeShape(EObj * eo)
+EobjShapeUpdate(EObj * eo, int propagate)
{
+ int was_shaped = eo->shaped;
+
+ if (propagate)
+ eo->shaped = EShapePropagate(eo->win) != 0;
#if USE_COMPOSITE
+ else
+ eo->shaped = EShapeCheck(eo->win) != 0;
+
+ if (was_shaped <= 0 && eo->shaped <= 0)
+ return;
+
+ /* Shape may still be unchanged. Well ... */
if (eo->shown && eo->cmhook)
ECompMgrWinChangeShape(eo);
-#else
- eo = NULL;
#endif
}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/eobj.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -3 -r1.22 -r1.23
--- eobj.h 14 Jan 2006 14:30:51 -0000 1.22
+++ eobj.h 22 Jan 2006 18:25:39 -0000 1.23
@@ -37,6 +37,7 @@
int x, y;
int w, h;
signed char stacked;
+ signed char shaped;
char sticky;
char floating;
unsigned external:1;
@@ -119,7 +120,7 @@
#define EoReparent(eo, d, x, y) EobjReparent(EoObj(eo), d, x, y)
#define EoRaise(eo) EobjRaise(EoObj(eo))
#define EoLower(eo) EobjLower(EoObj(eo))
-#define EoChangeShape(eo) EobjChangeShape(EoObj(eo))
+#define EoShapeUpdate(eo, p) EobjShapeUpdate(EoObj(eo), p)
/* eobj.c */
void EobjInit(EObj * eo, int type, Window win, int x, int y,
@@ -143,7 +144,7 @@
void EobjReparent(EObj * eo, EObj * dst, int x, int y);
int EobjRaise(EObj * eo);
int EobjLower(EObj * eo);
-void EobjChangeShape(EObj * eo);
+void EobjShapeUpdate(EObj * eo, int propagate);
void EobjsRepaint(void);
Pixmap EobjGetPixmap(const EObj * eo);
void EobjChangeOpacity(EObj * eo, unsigned int opacity);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewins.c,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -3 -r1.141 -r1.142
--- ewins.c 22 Jan 2006 18:12:03 -0000 1.141
+++ ewins.c 22 Jan 2006 18:25:39 -0000 1.142
@@ -640,8 +640,7 @@
Eprintf("EwinPropagateShapes %#lx frame=%#lx shaped=%d\n",
_EwinGetClientXwin(ewin), EoGetWin(ewin), ewin->state.shaped);
- EShapePropagate(EoGetWin(ewin));
- EoChangeShape(ewin);
+ EoShapeUpdate(ewin, 1);
ewin->update.shape = 0;
}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ipc.c,v
retrieving revision 1.252
retrieving revision 1.253
diff -u -3 -r1.252 -r1.253
--- ipc.c 7 Jan 2006 07:20:58 -0000 1.252
+++ ipc.c 22 Jan 2006 18:25:40 -0000 1.253
@@ -1061,19 +1061,21 @@
lst = EobjListStackGet(&num);
- IpcPrintf("Num window T V D S F L pos size C R Name\n");
+ IpcPrintf
+ ("Num window T V Sh Dsk S F L pos size C R Name\n");
for (i = 0; i < num; i++)
{
eo = lst[i];
- IpcPrintf(" %2d %#9lx %d %d %2d %d %d %3d %5d,%5d %4dx%4d %d %d %s\n",
- i, eo->win, eo->type, eo->shown, eo->desk->num, eo->sticky,
- eo->floating, eo->ilayer, eo->x, eo->y, eo->w, eo->h,
+ IpcPrintf
+ (" %2d %#9lx %d %d %2d %3d %d %d %3d %5d,%5d %4dx%4d %d %d %s\n",
+ i, eo->win, eo->type, eo->shown, eo->shaped, eo->desk->num,
+ eo->sticky, eo->floating, eo->ilayer, eo->x, eo->y, eo->w, eo->h,
#if USE_COMPOSITE
- (eo->cmhook) ? 1 : 0, !eo->noredir
+ (eo->cmhook) ? 1 : 0, !eo->noredir
#else
- 0, 0
+ 0, 0
#endif
- , eo->name);
+ , eo->name);
}
}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/warp.c,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -3 -r1.84 -r1.85
--- warp.c 7 Jan 2006 07:20:58 -0000 1.84
+++ warp.c 22 Jan 2006 18:25:41 -0000 1.85
@@ -242,8 +242,7 @@
}
/* FIXME - Check shape */
- EShapePropagate(EoGetWin(fw));
- EoChangeShape(fw);
+ EoShapeUpdate(fw, 1);
}
static void
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/x.c,v
retrieving revision 1.116
retrieving revision 1.117
diff -u -3 -r1.116 -r1.117
--- x.c 7 Jan 2006 08:53:15 -0000 1.116
+++ x.c 22 Jan 2006 18:25:41 -0000 1.117
@@ -1147,7 +1147,7 @@
return rn != 0;
}
-static void
+static int
ExShapePropagate(EXID * xid)
{
EXID *xch;
@@ -1159,7 +1159,7 @@
XWindowAttributes att;
if (!xid || xid->w <= 0 || xid->h <= 0)
- return;
+ return 0;
#if DEBUG_SHAPE_PROPAGATE
Eprintf("ExShapePropagate %#lx %d,%d %dx%d\n", win, xid->x, xid->y, xid->w,
@@ -1168,7 +1168,7 @@
XQueryTree(disp, xid->win, &rt, &par, &list, &num);
if (!list)
- return;
+ return 0;
num_rects = 0;
rects = NULL;
@@ -1251,6 +1251,8 @@
ExShapeCombineRectangles(xid, ShapeBounding, 0, 0, NULL, 0, ShapeSet,
Unsorted);
}
+
+ return xid->num_rect;
}
void
@@ -1304,13 +1306,24 @@
return ExShapeCopy(xdst, xsrc);
}
-void
+int
EShapePropagate(Window win)
{
EXID *xid;
xid = EXidFind(win);
- ExShapePropagate(xid);
+
+ return ExShapePropagate(xid);
+}
+
+int
+EShapeCheck(Window win)
+{
+ EXID *xid;
+
+ xid = EXidFind(win);
+
+ return xid->num_rect;
}
Pixmap
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/xwin.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- xwin.h 7 Jan 2006 07:20:58 -0000 1.9
+++ xwin.h 22 Jan 2006 18:25:41 -0000 1.10
@@ -104,7 +104,8 @@
XRectangle *EShapeGetRectangles(Window win, int dest, int *rn,
int *ord);
int EShapeCopy(Window dst, Window src);
-void EShapePropagate(Window win);
+int EShapePropagate(Window win);
+int EShapeCheck(Window win);
Pixmap EWindowGetShapePixmap(Window win);
#define ECreatePixmap(draw, w, h, depth) XCreatePixmap(disp, draw, w, h, depth)
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs