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.250 by sasha, Wed Sep 12 21:06:08 2007 UTC vs.
Revision 1.253 by ayin, Mon Oct 15 07:33:48 2007 UTC

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
206void
206void rxvt_term::emergency_cleanup () 207rxvt_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
907void
906void rxvt_term::set_string_property (Atom prop, const char *str, int len) 908rxvt_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
915void
913void rxvt_term::set_utf8_property (Atom prop, const char *str, int len) 916rxvt_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],
942#if ENABLE_EWMH 945#if ENABLE_EWMH
943 set_utf8_property (xa[XA_NET_WM_ICON_NAME], str); 946 set_utf8_property (xa[XA_NET_WM_ICON_NAME], str);
944#endif 947#endif
945} 948}
946 949
950void
951rxvt_term::set_window_color (int idx, const char *color)
952{
947#ifdef XTERM_COLOR_CHANGE 953#ifdef XTERM_COLOR_CHANGE
948void
949rxvt_term::set_window_color (int idx, const char *color)
950{
951 rxvt_color xcol; 954 rxvt_color xcol;
952 int i; 955 int i;
953 956
954 if (color == NULL || *color == '\0') 957 if (color == NULL || *color == '\0')
955 return; 958 return;
992 /*TODO: handle Color_BD, scrollbar background, etc. */ 995 /*TODO: handle Color_BD, scrollbar background, etc. */
993 996
994 update_fade_color (idx); 997 update_fade_color (idx);
995 recolour_cursor (); 998 recolour_cursor ();
996 scr_recolour (); 999 scr_recolour ();
997}
998
999#else
1000# define set_window_color (idx,color) ((void)0)
1001#endif /* XTERM_COLOR_CHANGE */ 1000#endif /* XTERM_COLOR_CHANGE */
1001}
1002 1002
1003void 1003void
1004rxvt_term::recolour_cursor () 1004rxvt_term::recolour_cursor ()
1005{ 1005{
1006 XColor fg, bg; 1006 XColor fg, bg;
1733 1733
1734#ifdef HAVE_BG_PIXMAP 1734#ifdef HAVE_BG_PIXMAP
1735int 1735int
1736rxvt_term::update_background () 1736rxvt_term::update_background ()
1737{ 1737{
1738 bgPixmap.invalidate(); 1738 bgPixmap.invalidate ();
1739 1739
1740 /* no chance of real time refresh if we are blurring ! */ 1740 /* no chance of real time refresh if we are blurring ! */
1741 if (bgPixmap.invalid_since + 0.5 < NOW && !(bgPixmap.flags & bgPixmap_t::blurNeeded)) 1741 if (bgPixmap.invalid_since + 0.5 < NOW && !(bgPixmap.flags & bgPixmap_t::blurNeeded))
1742 bgPixmap.render(); 1742 bgPixmap.render ();
1743 else 1743 else
1744 { 1744 {
1745 update_background_ev.stop (); 1745 update_background_ev.stop ();
1746 if (!bgPixmap.need_client_side_rendering()) 1746 if (!bgPixmap.need_client_side_rendering())
1747 update_background_ev.start (NOW + .05); 1747 update_background_ev.start (NOW + .05);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines