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.137 by root, Tue Feb 15 16:04:45 2005 UTC vs.
Revision 1.144 by root, Sun Feb 20 19:45:30 2005 UTC

30 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 30 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
31 *---------------------------------------------------------------------*/ 31 *---------------------------------------------------------------------*/
32 32
33#include "../config.h" /* NECESSARY */ 33#include "../config.h" /* NECESSARY */
34#include "rxvt.h" /* NECESSARY */ 34#include "rxvt.h" /* NECESSARY */
35#include "main.intpro" /* PROTOS for internal routines */
36 35
37#include <csignal> 36#include <csignal>
38#include <cstring> 37#include <cstring>
39 38
40#ifdef TTY_GID_SUPPORT 39#ifdef TTY_GID_SUPPORT
253 //if (menuBar.win) 252 //if (menuBar.win)
254 // XDestroyWindow (disp, menuBar.win); 253 // XDestroyWindow (disp, menuBar.win);
255#endif 254#endif
256 delete TermWin.drawable; 255 delete TermWin.drawable;
257 // destroy all windows 256 // destroy all windows
258 if (TermWin.parent[0] 257 if (TermWin.parent[0])
259#if ENABLE_FRILLS
260 && !rs[Rs_embed]
261#endif
262 )
263 XDestroyWindow (disp, TermWin.parent[0]); 258 XDestroyWindow (disp, TermWin.parent[0]);
264 } 259 }
265 260
266 // TODO: free pixcolours, colours should become part of rxvt_display 261 // TODO: free pixcolours, colours should become part of rxvt_display
267 262
590 rxvt_fatal ("memory allocation failure. aborting.\n"); 585 rxvt_fatal ("memory allocation failure. aborting.\n");
591 586
592 return p; 587 return p;
593} 588}
594 589
595/* INTPROTO */
596void * 590void *
597rxvt_calloc (size_t number, size_t size) 591rxvt_calloc (size_t number, size_t size)
598{ 592{
599 void *p = calloc (number, size); 593 void *p = calloc (number, size);
600 594
602 rxvt_fatal ("memory allocation failure. aborting.\n"); 596 rxvt_fatal ("memory allocation failure. aborting.\n");
603 597
604 return p; 598 return p;
605} 599}
606 600
607/* INTPROTO */
608void * 601void *
609rxvt_realloc (void *ptr, size_t size) 602rxvt_realloc (void *ptr, size_t size)
610{ 603{
611 void *p = realloc (ptr, size); 604 void *p = realloc (ptr, size);
612 605
848 (void)ioctl (pty.pty, TIOCSWINSZ, &ws); 841 (void)ioctl (pty.pty, TIOCSWINSZ, &ws);
849 842
850#if 0 843#if 0
851 // TIOCSWINSZ⎈ is supposed to do this automatically and correctly 844 // TIOCSWINSZ⎈ is supposed to do this automatically and correctly
852 if (cmd_pid) /* force through to the command */ 845 if (cmd_pid) /* force through to the command */
853 kill (cmd_pid, SIGWINCH); 846 kill (-cmd_pid, SIGWINCH);
854#endif 847#endif
855} 848}
856 849
857/*----------------------------------------------------------------------*/ 850/*----------------------------------------------------------------------*/
858/* set_fonts () - load and set the various fonts 851/* set_fonts () - load and set the various fonts
962/* xterm sequences - title, iconName, color (exptl) */ 955/* xterm sequences - title, iconName, color (exptl) */
963void 956void
964rxvt_term::set_title (const char *str) 957rxvt_term::set_title (const char *str)
965{ 958{
966 set_string_property (XA_WM_NAME, str); 959 set_string_property (XA_WM_NAME, str);
967#if ENABLE_FRILLS 960#if ENABLE_EWMH
968 set_utf8_property (xa[XA_NET_WM_NAME], str); 961 set_utf8_property (xa[XA_NET_WM_NAME], str);
969#endif 962#endif
970} 963}
971 964
972void 965void
973rxvt_term::set_icon_name (const char *str) 966rxvt_term::set_icon_name (const char *str)
974{ 967{
975 set_string_property (XA_WM_ICON_NAME, str); 968 set_string_property (XA_WM_ICON_NAME, str);
976#if ENABLE_FRILLS 969#if ENABLE_EWMH
977 set_utf8_property (xa[XA_NET_WM_ICON_NAME], str); 970 set_utf8_property (xa[XA_NET_WM_ICON_NAME], str);
978#endif 971#endif
979} 972}
980 973
981#ifdef XTERM_COLOR_CHANGE 974#ifdef XTERM_COLOR_CHANGE
1253 XWindowAttributes wattr; 1246 XWindowAttributes wattr;
1254 1247
1255 if (width == 0 || height == 0) 1248 if (width == 0 || height == 0)
1256 { 1249 {
1257 XGetWindowAttributes (display->display, display->root, &wattr); 1250 XGetWindowAttributes (display->display, display->root, &wattr);
1251
1258 if (width == 0) 1252 if (width == 0)
1259 width = wattr.width - szHint.base_width; 1253 width = wattr.width - szHint.base_width;
1260 if (height == 0) 1254 if (height == 0)
1261 height = wattr.height - szHint.base_height; 1255 height = wattr.height - szHint.base_height;
1262 } 1256 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines