… | |
… | |
201 | #endif |
201 | #endif |
202 | } |
202 | } |
203 | |
203 | |
204 | // clean up the most important stuff, do *not* call x or free mem etc. |
204 | // clean up the most important stuff, do *not* call x or free mem etc. |
205 | // for use before an emergency exit |
205 | // for use before an emergency exit |
|
|
206 | void |
206 | void rxvt_term::emergency_cleanup () |
207 | rxvt_term::emergency_cleanup () |
207 | { |
208 | { |
208 | if (cmd_pid) |
209 | if (cmd_pid) |
209 | kill (-cmd_pid, SIGHUP); |
210 | kill (-cmd_pid, SIGHUP); |
210 | |
211 | |
211 | pty_ev.stop (); |
212 | pty_ev.stop (); |
… | |
… | |
901 | } |
902 | } |
902 | |
903 | |
903 | return true; |
904 | return true; |
904 | } |
905 | } |
905 | |
906 | |
|
|
907 | void |
906 | void rxvt_term::set_string_property (Atom prop, const char *str, int len) |
908 | rxvt_term::set_string_property (Atom prop, const char *str, int len) |
907 | { |
909 | { |
908 | XChangeProperty (dpy, parent[0], |
910 | XChangeProperty (dpy, parent[0], |
909 | prop, XA_STRING, 8, PropModeReplace, |
911 | prop, XA_STRING, 8, PropModeReplace, |
910 | (const unsigned char *)str, len >= 0 ? len : strlen (str)); |
912 | (const unsigned char *)str, len >= 0 ? len : strlen (str)); |
911 | } |
913 | } |
912 | |
914 | |
|
|
915 | void |
913 | void rxvt_term::set_utf8_property (Atom prop, const char *str, int len) |
916 | rxvt_term::set_utf8_property (Atom prop, const char *str, int len) |
914 | { |
917 | { |
915 | wchar_t *ws = rxvt_mbstowcs (str, len); |
918 | wchar_t *ws = rxvt_mbstowcs (str, len); |
916 | char *s = rxvt_wcstoutf8 (ws); |
919 | char *s = rxvt_wcstoutf8 (ws); |
917 | |
920 | |
918 | XChangeProperty (dpy, parent[0], |
921 | XChangeProperty (dpy, parent[0], |