Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
iconify.c x.c
Log Message:
Fix icons for apps specifying pixmap but no mask.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/iconify.c,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -3 -r1.75 -r1.76
--- iconify.c 1 Dec 2003 21:48:11 -0000 1.75
+++ iconify.c 4 Dec 2003 19:02:03 -0000 1.76
@@ -718,6 +718,7 @@
ewin->icon_w = (int)w;
ewin->icon_h = (int)h;
ewin->icon_pmm.pmap = ECreatePixmap(disp, root.win, w, h, root.depth);
+ ewin->icon_pmm.mask = 0;
if (ewin->client.icon_mask)
ewin->icon_pmm.mask = ECreatePixmap(disp, root.win, w, h, 1);
@@ -766,8 +767,6 @@
{
ImageClass *ic;
PmapMask pmm;
- GC gc;
- XGCValues gcv;
/* get the base pixmap */
ic = FindItem("DEFAULT_ICON_BUTTON", 0, LIST_FINDBY_NAME, LIST_TYPE_ICLASS);
@@ -775,17 +774,7 @@
return;
IclassApplyCopy(ic, d, w, h, 0, 0, STATE_NORMAL, &pmm, 1);
- if (pmm.mask)
- {
- PasteMask(disp, d, pmm.mask, x, y, w, h);
- }
- else
- {
- gc = XCreateGC(disp, d, 0, &gcv);
- XSetForeground(disp, gc, 1);
- XFillRectangle(disp, d, gc, x, y, w, h);
- XFreeGC(disp, gc);
- }
+ PasteMask(disp, d, pmm.mask, x, y, w, h);
FreePmapMask(&pmm);
}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/x.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -3 -r1.57 -r1.58
--- x.c 22 Nov 2003 00:15:41 -0000 1.57
+++ x.c 4 Dec 2003 19:02:03 -0000 1.58
@@ -865,12 +865,11 @@
void
PasteMask(Display * d, Drawable w, Pixmap p, int x, int y, int wd, int ht)
{
- static GC gc = 0;
+ GC gc;
XGCValues gcv;
int ww, hh;
- if (!gc)
- gc = XCreateGC(d, w, 0, &gcv);
+ gc = XCreateGC(d, w, 0, &gcv);
if (p)
{
GetWinWH(p, (unsigned int *)&ww, (unsigned int *)&hh);
@@ -883,4 +882,5 @@
XSetForeground(disp, gc, 1);
XFillRectangle(disp, w, gc, x, y, wd, ht);
}
+ XFreeGC(disp, gc);
}
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs