… | |
… | |
252 | //if (menuBar.win) |
252 | //if (menuBar.win) |
253 | // XDestroyWindow (disp, menuBar.win); |
253 | // XDestroyWindow (disp, menuBar.win); |
254 | #endif |
254 | #endif |
255 | delete TermWin.drawable; |
255 | delete TermWin.drawable; |
256 | // destroy all windows |
256 | // destroy all windows |
257 | if (TermWin.parent[0] |
257 | if (TermWin.parent[0]) |
258 | #if ENABLE_FRILLS |
|
|
259 | && !rs[Rs_embed] |
|
|
260 | #endif |
|
|
261 | ) |
|
|
262 | XDestroyWindow (disp, TermWin.parent[0]); |
258 | XDestroyWindow (disp, TermWin.parent[0]); |
263 | } |
259 | } |
264 | |
260 | |
265 | // TODO: free pixcolours, colours should become part of rxvt_display |
261 | // TODO: free pixcolours, colours should become part of rxvt_display |
266 | |
262 | |
… | |
… | |
589 | rxvt_fatal ("memory allocation failure. aborting.\n"); |
585 | rxvt_fatal ("memory allocation failure. aborting.\n"); |
590 | |
586 | |
591 | return p; |
587 | return p; |
592 | } |
588 | } |
593 | |
589 | |
594 | /* INTPROTO */ |
|
|
595 | void * |
590 | void * |
596 | rxvt_calloc (size_t number, size_t size) |
591 | rxvt_calloc (size_t number, size_t size) |
597 | { |
592 | { |
598 | void *p = calloc (number, size); |
593 | void *p = calloc (number, size); |
599 | |
594 | |
… | |
… | |
601 | rxvt_fatal ("memory allocation failure. aborting.\n"); |
596 | rxvt_fatal ("memory allocation failure. aborting.\n"); |
602 | |
597 | |
603 | return p; |
598 | return p; |
604 | } |
599 | } |
605 | |
600 | |
606 | /* INTPROTO */ |
|
|
607 | void * |
601 | void * |
608 | rxvt_realloc (void *ptr, size_t size) |
602 | rxvt_realloc (void *ptr, size_t size) |
609 | { |
603 | { |
610 | void *p = realloc (ptr, size); |
604 | void *p = realloc (ptr, size); |
611 | |
605 | |
… | |
… | |
847 | (void)ioctl (pty.pty, TIOCSWINSZ, &ws); |
841 | (void)ioctl (pty.pty, TIOCSWINSZ, &ws); |
848 | |
842 | |
849 | #if 0 |
843 | #if 0 |
850 | // TIOCSWINSZ⎈ is supposed to do this automatically and correctly |
844 | // TIOCSWINSZ⎈ is supposed to do this automatically and correctly |
851 | if (cmd_pid) /* force through to the command */ |
845 | if (cmd_pid) /* force through to the command */ |
852 | kill (cmd_pid, SIGWINCH); |
846 | kill (-cmd_pid, SIGWINCH); |
853 | #endif |
847 | #endif |
854 | } |
848 | } |
855 | |
849 | |
856 | /*----------------------------------------------------------------------*/ |
850 | /*----------------------------------------------------------------------*/ |
857 | /* set_fonts () - load and set the various fonts |
851 | /* set_fonts () - load and set the various fonts |
… | |
… | |
1252 | XWindowAttributes wattr; |
1246 | XWindowAttributes wattr; |
1253 | |
1247 | |
1254 | if (width == 0 || height == 0) |
1248 | if (width == 0 || height == 0) |
1255 | { |
1249 | { |
1256 | XGetWindowAttributes (display->display, display->root, &wattr); |
1250 | XGetWindowAttributes (display->display, display->root, &wattr); |
|
|
1251 | |
1257 | if (width == 0) |
1252 | if (width == 0) |
1258 | width = wattr.width - szHint.base_width; |
1253 | width = wattr.width - szHint.base_width; |
1259 | if (height == 0) |
1254 | if (height == 0) |
1260 | height = wattr.height - szHint.base_height; |
1255 | height = wattr.height - szHint.base_height; |
1261 | } |
1256 | } |