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.256 by root, Wed Nov 5 12:28:15 2008 UTC vs.
Revision 1.262 by sf-exg, Sun Jan 31 09:02:48 2010 UTC

293 ncol = 80; 293 ncol = 80;
294 nrow = 24; 294 nrow = 24;
295 int_bwidth = INTERNALBORDERWIDTH; 295 int_bwidth = INTERNALBORDERWIDTH;
296 ext_bwidth = EXTERNALBORDERWIDTH; 296 ext_bwidth = EXTERNALBORDERWIDTH;
297 lineSpace = LINESPACE; 297 lineSpace = LINESPACE;
298 letterSpace = LETTERSPACE;
298 saveLines = SAVELINES; 299 saveLines = SAVELINES;
299 300
300 refresh_type = SLOW_REFRESH; 301 refresh_type = SLOW_REFRESH;
301 302
302 oldcursor.row = oldcursor.col = -1; 303 oldcursor.row = oldcursor.col = -1;
307 set_option (Opt_skipScroll); 308 set_option (Opt_skipScroll);
308 set_option (Opt_secondaryScreen); 309 set_option (Opt_secondaryScreen);
309 set_option (Opt_secondaryScroll); 310 set_option (Opt_secondaryScroll);
310 set_option (Opt_pastableTabs); 311 set_option (Opt_pastableTabs);
311 set_option (Opt_intensityStyles); 312 set_option (Opt_intensityStyles);
313 set_option (Opt_iso14755);
312 set_option (Opt_iso14755_52); 314 set_option (Opt_iso14755_52);
313 set_option (Opt_buffered); 315 set_option (Opt_buffered);
314} 316}
315 317
316static void 318static void
448 if (rs[Rs_ext_bwidth] && (i = atoi (rs[Rs_ext_bwidth])) >= 0) 450 if (rs[Rs_ext_bwidth] && (i = atoi (rs[Rs_ext_bwidth])) >= 0)
449 ext_bwidth = min (i, std::numeric_limits<int16_t>::max ()); 451 ext_bwidth = min (i, std::numeric_limits<int16_t>::max ());
450 452
451 if (rs[Rs_lineSpace] && (i = atoi (rs[Rs_lineSpace])) >= 0) 453 if (rs[Rs_lineSpace] && (i = atoi (rs[Rs_lineSpace])) >= 0)
452 lineSpace = min (i, std::numeric_limits<int16_t>::max ()); 454 lineSpace = min (i, std::numeric_limits<int16_t>::max ());
455
456 if (rs[Rs_letterSpace])
457 letterSpace = atoi (rs[Rs_letterSpace]);
453#endif 458#endif
454 459
455#ifdef POINTER_BLANK 460#ifdef POINTER_BLANK
456 if (rs[Rs_pointerBlankDelay] && (i = atoi (rs[Rs_pointerBlankDelay])) >= 0) 461 if (rs[Rs_pointerBlankDelay] && (i = atoi (rs[Rs_pointerBlankDelay])) >= 0)
457 pointerBlankDelay = i; 462 pointerBlankDelay = i;
1124 this->parent[0] = top; 1129 this->parent[0] = top;
1125 1130
1126 old_width = szHint.width; 1131 old_width = szHint.width;
1127 old_height = szHint.height; 1132 old_height = szHint.height;
1128 1133
1129 process_xterm_seq (XTerm_title, rs[Rs_title], CHAR_ST); 1134 set_title (rs [Rs_title]);
1130 process_xterm_seq (XTerm_iconName, rs[Rs_iconName], CHAR_ST); 1135 set_icon_name (rs [Rs_iconName]);
1131 1136
1132 classHint.res_name = (char *)rs[Rs_name]; 1137 classHint.res_name = (char *)rs[Rs_name];
1133 classHint.res_class = (char *)RESCLASS; 1138 classHint.res_class = (char *)RESCLASS;
1134 1139
1135 wmHint.flags = InputHint | StateHint | WindowGroupHint; 1140 wmHint.flags = InputHint | StateHint | WindowGroupHint;
1137 wmHint.initial_state = option (Opt_iconic) ? IconicState : NormalState; 1142 wmHint.initial_state = option (Opt_iconic) ? IconicState : NormalState;
1138 wmHint.window_group = top; 1143 wmHint.window_group = top;
1139 1144
1140 XmbSetWMProperties (dpy, top, NULL, NULL, (char **)argv, argc, 1145 XmbSetWMProperties (dpy, top, NULL, NULL, (char **)argv, argc,
1141 &szHint, &wmHint, &classHint); 1146 &szHint, &wmHint, &classHint);
1142#if ENABLE_EWMH 1147#if ENABLE_EWMH
1143# ifdef HAVE_AFTERIMAGE 1148# ifdef HAVE_AFTERIMAGE
1144 /* 1149 /*
1145 * set up icon hint 1150 * set up icon hint
1146 * 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
1147 */ 1152 */
1153 ASImage *im = file2ASImage (rs [Rs_iconfile], 0xFFFFFFFF, SCREEN_GAMMA, 0, NULL); 1158 ASImage *im = file2ASImage (rs [Rs_iconfile], 0xFFFFFFFF, SCREEN_GAMMA, 0, NULL);
1154 if (asv && im) 1159 if (asv && im)
1155 { 1160 {
1156 int w = im->width; 1161 int w = im->width;
1157 int h = im->height; 1162 int h = im->height;
1158 long* buffer = (long *)malloc ((2 + w * h) * sizeof (long)); 1163 long *buffer = (long *)malloc ((2 + w * h) * sizeof (long));
1159 ASImage *result = scale_asimage (asv, im, 1164 ASImage *result = scale_asimage (asv, im,
1160 w, h, ASA_ARGB32, 1165 w, h, ASA_ARGB32,
1161 100, ASIMAGE_QUALITY_DEFAULT); 1166 100, ASIMAGE_QUALITY_DEFAULT);
1162 destroy_asimage (&im); 1167 destroy_asimage (&im);
1163 1168
1170 for (unsigned int i = 0; i < w * h; ++i) 1175 for (unsigned int i = 0; i < w * h; ++i)
1171 buffer [i + 2] = asbuf [i]; 1176 buffer [i + 2] = asbuf [i];
1172 1177
1173 destroy_asimage (&result); 1178 destroy_asimage (&result);
1174 XChangeProperty (dpy, top, xa[XA_NET_WM_ICON], XA_CARDINAL, 32, 1179 XChangeProperty (dpy, top, xa[XA_NET_WM_ICON], XA_CARDINAL, 32,
1175 PropModeReplace, (const unsigned char*) buffer, 2 + w * h); 1180 PropModeReplace, (const unsigned char *) buffer, 2 + w * h);
1176 free (buffer); 1181 free (buffer);
1177 } 1182 }
1178 else 1183 else
1179 { 1184 {
1180 if (!buffer) 1185 if (!buffer)
1601 const char *argv0, *shell; 1606 const char *argv0, *shell;
1602 1607
1603 if ((shell = getenv ("SHELL")) == NULL || *shell == '\0') 1608 if ((shell = getenv ("SHELL")) == NULL || *shell == '\0')
1604 shell = "/bin/sh"; 1609 shell = "/bin/sh";
1605 1610
1606 argv0 = (const char *)rxvt_basename (shell); 1611 argv0 = rxvt_basename (shell);
1607 1612
1608 if (option (Opt_loginShell)) 1613 if (option (Opt_loginShell))
1609 { 1614 {
1610 login = (char *)rxvt_malloc (strlen (argv0) + 2); 1615 login = (char *)rxvt_malloc (strlen (argv0) + 2);
1611 1616

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines