ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/init.C
(Generate patch)

Comparing rxvt-unicode/src/init.C (file contents):
Revision 1.260 by sf-exg, Wed Jan 6 12:10:44 2010 UTC vs.
Revision 1.261 by sf-exg, Sat Jan 30 20:52:36 2010 UTC

1158 ASImage *im = file2ASImage (rs [Rs_iconfile], 0xFFFFFFFF, SCREEN_GAMMA, 0, NULL); 1158 ASImage *im = file2ASImage (rs [Rs_iconfile], 0xFFFFFFFF, SCREEN_GAMMA, 0, NULL);
1159 if (asv && im) 1159 if (asv && im)
1160 { 1160 {
1161 int w = im->width; 1161 int w = im->width;
1162 int h = im->height; 1162 int h = im->height;
1163 long* buffer = (long *)malloc ((2 + w * h) * sizeof (long)); 1163 long *buffer = (long *)malloc ((2 + w * h) * sizeof (long));
1164 ASImage *result = scale_asimage (asv, im, 1164 ASImage *result = scale_asimage (asv, im,
1165 w, h, ASA_ARGB32, 1165 w, h, ASA_ARGB32,
1166 100, ASIMAGE_QUALITY_DEFAULT); 1166 100, ASIMAGE_QUALITY_DEFAULT);
1167 destroy_asimage (&im); 1167 destroy_asimage (&im);
1168 1168
1175 for (unsigned int i = 0; i < w * h; ++i) 1175 for (unsigned int i = 0; i < w * h; ++i)
1176 buffer [i + 2] = asbuf [i]; 1176 buffer [i + 2] = asbuf [i];
1177 1177
1178 destroy_asimage (&result); 1178 destroy_asimage (&result);
1179 XChangeProperty (dpy, top, xa[XA_NET_WM_ICON], XA_CARDINAL, 32, 1179 XChangeProperty (dpy, top, xa[XA_NET_WM_ICON], XA_CARDINAL, 32,
1180 PropModeReplace, (const unsigned char*) buffer, 2 + w * h); 1180 PropModeReplace, (const unsigned char *) buffer, 2 + w * h);
1181 free (buffer); 1181 free (buffer);
1182 } 1182 }
1183 else 1183 else
1184 { 1184 {
1185 if (!buffer) 1185 if (!buffer)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines