Enlightenment CVS committal Author : kwo Project : e16 Module : e
Dir : e16/e/src Modified Files: ecompmgr.c Log Message: CM: Make it less likely that X-errors occur when window is unmapped. =================================================================== RCS file: /cvs/e/e16/e/src/ecompmgr.c,v retrieving revision 1.158 retrieving revision 1.159 diff -u -3 -r1.158 -r1.159 --- ecompmgr.c 11 Jul 2007 08:54:19 -0000 1.158 +++ ecompmgr.c 11 Jul 2007 09:02:33 -0000 1.159 @@ -1179,6 +1179,18 @@ ERegionShow("shape", cw->shape); } +static Pixmap +EWindowGetNamePixmap(Win win) +{ + XWindowAttributes xwa; + + if (XGetWindowAttributes(disp, win->xwin, &xwa) == 0 || + xwa.map_state == IsUnmapped) + return None; + + return XCompositeNameWindowPixmap(disp, WinGetXwin(win)); +} + Pixmap ECompMgrWinGetPixmap(const EObj * eo) { @@ -1193,7 +1205,7 @@ if (eo->noredir) return None; - cw->pixmap = XCompositeNameWindowPixmap(disp, EobjGetXwin(eo)); + cw->pixmap = EWindowGetNamePixmap(EobjGetWin(eo)); return cw->pixmap; } @@ -1466,12 +1478,12 @@ if (!eo->shown) /* Sometimes we get a synthetic one too */ return; + _ECM_SET_STACK_CHANGED(); if (Conf_compmgr.fading.enable && eo->fade && !eo->gone) ECompMgrWinFadeOut(eo); else { ECompMgrDamageMergeObject(eo, cw->extents); - _ECM_SET_STACK_CHANGED(); ECompMgrWinInvalidate(eo, INV_PIXMAP); } } @@ -1484,7 +1496,7 @@ if (cw->pixmap == None && eo->shown && !eo->noredir && (Mode_compmgr.use_pixmap || (eo->fade && Conf_compmgr.fading.enable))) { - cw->pixmap = XCompositeNameWindowPixmap(disp, EobjGetXwin(eo)); + cw->pixmap = EWindowGetNamePixmap(EobjGetWin(eo)); D2printf("ECompMgrWinSetPicts %#lx: Pmap=%#lx\n", EobjGetXwin(eo), cw->pixmap); } ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs