Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
borders.c buttons.c ecompmgr.c ecompmgr.h
Log Message:
Composite manager fixes and speedups. Cleanups.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/borders.c,v
retrieving revision 1.253
retrieving revision 1.254
diff -u -3 -r1.253 -r1.254
--- borders.c 24 Mar 2005 09:40:59 -0000 1.253
+++ borders.c 31 Mar 2005 23:22:01 -0000 1.254
@@ -875,20 +875,6 @@
*/
#define DEBUG_BORDER_EVENTS 0
-#if 0 /* FIXME - Remove? */
-static void
-BorderWinpartEventExpose(EWinBit * wbit, XEvent * ev __UNUSED__)
-{
- EWin *ewin = wbit->ewin;
- int part = wbit - ewin->bits;
-
- wbit->no_expose = 0;
- wbit->expose = 1;
- if (BorderWinpartDraw(ewin, part) && IsPropagateEwinOnQueue(ewin))
- EwinPropagateShapes(ewin);
-}
-#endif
-
static void
BorderWinpartEventMouseDown(EWinBit * wbit, XEvent * ev)
{
@@ -1039,11 +1025,6 @@
case LeaveNotify:
BorderWinpartEventLeave(wbit, ev);
break;
-#if 0 /* FIXME - Remove? */
- case Expose:
- BorderWinpartEventExpose(wbit, ev);
- break;
-#endif
}
}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/buttons.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -3 -r1.55 -r1.56
--- buttons.c 31 Mar 2005 16:02:56 -0000 1.55
+++ buttons.c 31 Mar 2005 23:22:02 -0000 1.56
@@ -631,19 +631,6 @@
* Button event handlers
*/
-#if 0 /* FIXME - Remove? */
-static void
-ButtonEventExpose(Button * b, XEvent * ev __UNUSED__)
-{
-#if 1
- if (!ECompMgrActive()) /* FIXME - Remove */
- ButtonDraw(b);
-#else
- b = NULL;
-#endif
-}
-#endif
-
static void
ButtonEventMouseDown(Button * b, XEvent * ev)
{
@@ -791,11 +778,6 @@
case LeaveNotify:
ButtonEventMouseOut(b, ev);
break;
-#if 0 /* FIXME - Remove? */
- case Expose:
- ButtonEventExpose(b, ev);
- break;
-#endif
}
}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ecompmgr.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- ecompmgr.c 30 Mar 2005 23:22:10 -0000 1.17
+++ ecompmgr.c 31 Mar 2005 23:22:02 -0000 1.18
@@ -342,9 +342,6 @@
XRenderPictFormat *pictfmt;
XRenderPictureAttributes pa;
- if (cmdi && cmdi->bgpict != None) /* FIXME - Leaking pict */
- return cmdi->bgpict;
-
fill = False;
pmap = BackgroundGetPixmap(DeskGetBackground(d->num));
D1printf("DeskBackgroundPictureGet: Desk %d: using pixmap %#lx\n", d->num,
@@ -372,8 +369,7 @@
/* New background, all must be repainted */
ECompMgrDamageAll();
- if (cmdi) /* FIXME - Leaking pict */
- cmdi->bgpict = pict;
+ cmdi->bgpict = pict;
return pict;
}
@@ -1645,9 +1641,13 @@
ECompMgrRepaint(void)
{
Display *dpy = disp;
- XserverRegion region = allDamage;
+ XserverRegion region;
EObj *eo;
Picture pict, pbuf;
+ Desk *d = DeskGet(0);
+
+ region = XFixesCreateRegion(disp, 0, 0);
+ XFixesCopyRegion(disp, region, allDamage);
D2printf("ECompMgrRepaint rootBuffer=%#lx rootPicture=%#lx\n",
rootBuffer, rootPicture);
@@ -1659,12 +1659,8 @@
VRoot.depth, VRoot.vis);
pbuf = rootBuffer;
- /* Draw desktop background picture */
- pict = DeskBackgroundPictureGet(DeskGet(0));
- D1printf("ECompMgrRepaint desk picture=%#lx\n", pict);
- XFixesSetPictureClipRegion(dpy, pbuf, 0, 0, region);
- XRenderComposite(dpy, PictOpSrc, pict, None, pbuf,
- 0, 0, 0, 0, 0, 0, VRoot.w, VRoot.h);
+ if (!d)
+ return;
/* Do paint order list linking */
ECompMgrRepaintDetermineOrder();
@@ -1674,18 +1670,26 @@
eo = ((ECmWinInfo *) (eo->cmhook))->next)
ECompMgrRepaintObj(pbuf, region, eo, 0);
+ /* Repaint background, clipped by damage region and opaque windows */
+ pict = DeskBackgroundPictureGet(d);
+ D1printf("ECompMgrRepaint desk picture=%#lx\n", pict);
+ XFixesSetPictureClipRegion(dpy, pbuf, 0, 0, region);
+ XRenderComposite(dpy, PictOpSrc, pict, None, pbuf,
+ 0, 0, 0, 0, 0, 0, VRoot.w, VRoot.h);
+
/* Paint trans windows and shadows bottom up */
for (eo = Mode_compmgr.eo_last; eo; eo = ((ECmWinInfo *)
(eo->cmhook))->prev)
ECompMgrRepaintObj(pbuf, None, eo, 1);
if (pbuf != rootPicture)
{
- XFixesSetPictureClipRegion(dpy, pbuf, 0, 0, None);
+ XFixesSetPictureClipRegion(dpy, pbuf, 0, 0, allDamage);
XRenderComposite(dpy, PictOpSrc, pbuf, None, rootPicture,
0, 0, 0, 0, 0, 0, VRoot.w, VRoot.h);
}
XFixesDestroyRegion(dpy, region);
+ XFixesDestroyRegion(dpy, allDamage);
allDamage = None;
}
@@ -1881,7 +1885,9 @@
if (Conf_compmgr.mode != ECM_MODE_AUTO)
{
ECompMgrDamageAll();
+#if 0 /* FIXME - Remove? */
ECompMgrRepaint();
+#endif
}
EventCallbackRegister(VRoot.win, 0, ECompMgrHandleRootEvent, NULL);
@@ -1962,11 +1968,13 @@
}
}
+#if 0 /* FIXME - Remove */
int
-ECompMgrActive(void) /* FIXME - Remove */
+ECompMgrActive(void)
{
return Mode_compmgr.active;
}
+#endif
/*
* Event handlers
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ecompmgr.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- ecompmgr.h 19 Mar 2005 16:40:01 -0000 1.4
+++ ecompmgr.h 31 Mar 2005 23:22:02 -0000 1.5
@@ -31,7 +31,6 @@
int shadow;
} cfg_composite;
-int ECompMgrActive(void); /* FIXME - Remove */
void ECompMgrParseArgs(const char *args);
void ECompMgrWinNew(EObj * eo);
@@ -47,8 +46,6 @@
#else
-#define ECompMgrActive() 0 /* FIXME - Remove */
-
#define ECompMgrWinDel(eo, gone, do_fade)
#define ExMoveResizeWindow(eo, x, y, w, h) EMoveResizeWindow((eo)->win, x, y,
w, h)
-------------------------------------------------------
This SF.net email is sponsored by Demarc:
A global provider of Threat Management Solutions.
Download our HomeAdmin security software for free today!
http://www.demarc.com/info/Sentarus/hamr30
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs