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.262 by sf-exg, Sun Jan 31 09:02:48 2010 UTC

1142 wmHint.initial_state = option (Opt_iconic) ? IconicState : NormalState; 1142 wmHint.initial_state = option (Opt_iconic) ? IconicState : NormalState;
1143 wmHint.window_group = top; 1143 wmHint.window_group = top;
1144 1144
1145 XmbSetWMProperties (dpy, top, NULL, NULL, (char **)argv, argc, 1145 XmbSetWMProperties (dpy, top, NULL, NULL, (char **)argv, argc,
1146 &szHint, &wmHint, &classHint); 1146 &szHint, &wmHint, &classHint);
1147#if ENABLE_EWMH 1147#if ENABLE_EWMH
1148# ifdef HAVE_AFTERIMAGE 1148# ifdef HAVE_AFTERIMAGE
1149 /* 1149 /*
1150 * set up icon hint 1150 * set up icon hint
1151 * rs [Rs_iconfile] is path to icon, asv has been created in init_resources 1151 * rs [Rs_iconfile] is path to icon, asv has been created in init_resources
1152 */ 1152 */
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