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

Comparing rxvt-unicode/src/main.C (file contents):
Revision 1.361 by sf-exg, Sun Aug 21 20:13:58 2011 UTC vs.
Revision 1.366 by sf-exg, Mon Jan 9 21:12:08 2012 UTC

267 for (int i = 0; i < allocated.size (); i++) 267 for (int i = 0; i < allocated.size (); i++)
268 free (allocated [i]); 268 free (allocated [i]);
269 269
270 free (selection.text); 270 free (selection.text);
271 free (selection.clip_text); 271 free (selection.clip_text);
272 // TODO: manage env vars in child only(!)
273 free (env_display);
274 free (env_term);
275 free (locale); 272 free (locale);
276 free (v_buffer); 273 free (v_buffer);
277 274
278 delete selection_req; 275 delete selection_req;
279 276
713 // size, i.e., when the wm does not honour our size hints, there are 710 // size, i.e., when the wm does not honour our size hints, there are
714 // extra areas not covered by the terminal screen. Such gaps, when a 711 // extra areas not covered by the terminal screen. Such gaps, when a
715 // bg pixmap is set, would have to be cleared manually to properly 712 // bg pixmap is set, would have to be cleared manually to properly
716 // refresh the background. We take the simpler route and shrink the 713 // refresh the background. We take the simpler route and shrink the
717 // vt window so as to avoid creating gaps. 714 // vt window so as to avoid creating gaps.
718 width = ncol * fwidth; 715 vt_width = ncol * fwidth;
719 height = nrow * fheight; 716 vt_height = nrow * fheight;
720} 717}
721 718
722/*----------------------------------------------------------------------*/ 719/*----------------------------------------------------------------------*/
723/* 720/*
724 * Tell the teletype handler what size the window is. 721 * Tell the teletype handler what size the window is.
732 729
733 struct winsize ws; 730 struct winsize ws;
734 731
735 ws.ws_col = ncol; 732 ws.ws_col = ncol;
736 ws.ws_row = nrow; 733 ws.ws_row = nrow;
737 ws.ws_xpixel = width; 734 ws.ws_xpixel = vt_width;
738 ws.ws_ypixel = height; 735 ws.ws_ypixel = vt_height;
739 ioctl (pty->pty, TIOCSWINSZ, &ws); 736 ioctl (pty->pty, TIOCSWINSZ, &ws);
740 737
741#if 0 738#if 0
742 // TIOCSWINSZ is supposed to do this automatically and correctly 739 // TIOCSWINSZ is supposed to do this automatically and correctly
743 if (cmd_pid) /* force through to the command */ 740 if (cmd_pid) /* force through to the command */
947 944
948/*----------------------------------------------------------------------*/ 945/*----------------------------------------------------------------------*/
949/* 946/*
950 * find if fg/bg matches any of the normal (low-intensity) colors 947 * find if fg/bg matches any of the normal (low-intensity) colors
951 */ 948 */
952void 949char *
953rxvt_term::set_colorfgbg () 950rxvt_term::get_colorfgbg ()
954{ 951{
955 unsigned int i; 952 unsigned int i;
956 const char *xpmb = ""; 953 const char *xpmb = "";
957 char fstr[] = "default"; 954 char fstr[] = "default";
958 char bstr[] = "default"; 955 char bstr[] = "default";
956 char *env_colorfgbg;
959 957
960 for (i = Color_Black; i <= Color_White; i++) 958 for (i = Color_Black; i <= Color_White; i++)
961 if (pix_colors[Color_fg] == pix_colors[i]) 959 if (pix_colors[Color_fg] == pix_colors[i])
962 { 960 {
963 sprintf (fstr, "%d", i - Color_Black); 961 sprintf (fstr, "%d", i - Color_Black);
972 xpmb = "default;"; 970 xpmb = "default;";
973#endif 971#endif
974 break; 972 break;
975 } 973 }
976 974
975 env_colorfgbg = (char *)rxvt_malloc (sizeof ("COLORFGBG=default;default;bg"));
977 sprintf (env_colorfgbg, "COLORFGBG=%s;%s%s", fstr, xpmb, bstr); 976 sprintf (env_colorfgbg, "COLORFGBG=%s;%s%s", fstr, xpmb, bstr);
977 return env_colorfgbg;
978} 978}
979 979
980/*----------------------------------------------------------------------*/ 980/*----------------------------------------------------------------------*/
981 981
982bool 982bool
1075 if (scrollBar.state) 1075 if (scrollBar.state)
1076 scrollBar.resize (); 1076 scrollBar.resize ();
1077 1077
1078 XMoveResizeWindow (dpy, vt, 1078 XMoveResizeWindow (dpy, vt,
1079 window_vt_x, window_vt_y, 1079 window_vt_x, window_vt_y,
1080 width, height); 1080 vt_width, vt_height);
1081 1081
1082#ifdef HAVE_BG_PIXMAP 1082#ifdef HAVE_BG_PIXMAP
1083 if (bg_window_size_sensitive ()) 1083 if (bg_window_size_sensitive ())
1084 update_background (); 1084 update_background ();
1085#endif 1085#endif
1110 newwidth = wattr.width - szHint.base_width; 1110 newwidth = wattr.width - szHint.base_width;
1111 if (newheight == 0) 1111 if (newheight == 0)
1112 newheight = wattr.height - szHint.base_height; 1112 newheight = wattr.height - szHint.base_height;
1113 } 1113 }
1114 1114
1115 if (newwidth != width || newheight != height) 1115 if (newwidth != vt_width || newheight != vt_height)
1116 { 1116 {
1117 newwidth += szHint.base_width; 1117 newwidth += szHint.base_width;
1118 newheight += szHint.base_height; 1118 newheight += szHint.base_height;
1119 resize_all_windows (newwidth, newheight, 0); 1119 resize_all_windows (newwidth, newheight, 0);
1120 } 1120 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines