Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
ecompmgr.c
Log Message:
Fix solid color BG's with composite.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ecompmgr.c,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -3 -r1.85 -r1.86
--- ecompmgr.c 4 Dec 2005 09:38:28 -0000 1.85
+++ ecompmgr.c 4 Dec 2005 18:19:58 -0000 1.86
@@ -477,7 +477,7 @@
}
/*
- * Desktops (move to desktops.c?)
+ * Desk background
*/
int
@@ -488,9 +488,7 @@
Picture pict;
XRenderPictFormat *pictfmt;
XRenderPictureAttributes pa;
- int fill = 0;
Pixmap pmap;
- unsigned long pixel;
if (!Mode_compmgr.active)
return 0;
@@ -518,8 +516,15 @@
if (dsk->bg.pmap == None)
{
+ GC gc;
+
pmap = XCreatePixmap(disp, VRoot.win, 1, 1, VRoot.depth);
- fill = 1;
+ gc = ECreateGC(pmap, 0, NULL);
+ XSetClipMask(disp, gc, 0);
+ XSetFillStyle(disp, gc, FillSolid);
+ XSetForeground(disp, gc, dsk->bg.pixel);
+ XFillRectangle(disp, pmap, gc, 0, 0, 1, 1);
+ EFreeGC(gc);
}
else
{
@@ -532,18 +537,8 @@
pictfmt = XRenderFindVisualFormat(disp, VRoot.vis);
pict = XRenderCreatePicture(disp, pmap, pictfmt, CPRepeat, &pa);
- if (fill)
- {
- XRenderColor c;
-
- /* FIXME - use desk bg color */
- pixel = 0;
-
- c.red = c.green = c.blue = 0x8080;
- c.alpha = 0xffff;
- XRenderFillRectangle(disp, PictOpSrc, pict, &c, 0, 0, 1, 1);
- XFreePixmap(disp, pmap);
- }
+ if (pmap != dsk->bg.pmap)
+ XFreePixmap(disp, pmap);
/* New background, all must be repainted */
ECompMgrDamageAll();
-------------------------------------------------------
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://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs