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.73 by root, Fri Jul 30 14:59:12 2004 UTC vs.
Revision 1.77 by root, Tue Aug 10 20:39:19 2004 UTC

171#endif 171#endif
172#ifdef USE_XIM 172#ifdef USE_XIM
173 im_ev (this, &rxvt_term::im_cb), 173 im_ev (this, &rxvt_term::im_cb),
174#endif 174#endif
175 check_ev (this, &rxvt_term::check_cb), 175 check_ev (this, &rxvt_term::check_cb),
176 flush_ev (this, &rxvt_term::flush_cb),
176 destroy_ev (this, &rxvt_term::destroy_cb), 177 destroy_ev (this, &rxvt_term::destroy_cb),
177 pty_ev (this, &rxvt_term::pty_cb), 178 pty_ev (this, &rxvt_term::pty_cb),
178 incr_ev (this, &rxvt_term::incr_cb) 179 incr_ev (this, &rxvt_term::incr_cb)
179{ 180{
180 cmdbuf_ptr = cmdbuf_endp = cmdbuf_base; 181 cmdbuf_ptr = cmdbuf_endp = cmdbuf_base;
200 201
201 if (display) 202 if (display)
202 { 203 {
203 selection_clear (); 204 selection_clear ();
204 205
206#ifdef USE_XIM
207 im_destroy ();
208#endif
205#ifdef MENUBAR 209#ifdef MENUBAR
206 if (menubarGC) XFreeGC (display->display, menubarGC); 210 if (menubarGC) XFreeGC (display->display, menubarGC);
207#endif 211#endif
208#ifdef XTERM_SCROLLBAR 212#ifdef XTERM_SCROLLBAR
209 if (xscrollbarGC) XFreeGC (display->display, xscrollbarGC); 213 if (xscrollbarGC) XFreeGC (display->display, xscrollbarGC);
273} 277}
274 278
275void 279void
276rxvt_term::destroy () 280rxvt_term::destroy ()
277{ 281{
282 if (destroy_ev.active)
283 return;
284
278 if (display) 285 if (display)
279 { 286 {
287#ifdef USE_XIM
288 im_ev.stop (display);
289#endif
290#ifdef HAVE_SCROLLBARS
291 scrollbar_ev.stop (display);
292#endif
293#ifdef MENUBAR
294 menubar_ev.stop (display);
295#endif
280 rootwin_ev.stop (display); 296 rootwin_ev.stop (display);
281 termwin_ev.stop (display); 297 termwin_ev.stop (display);
282 vt_ev.stop (display); 298 vt_ev.stop (display);
283#ifdef USE_XIM
284 im_destroy ();
285 im_ev.stop (display);
286#endif
287#ifdef HAVE_SCROLLBARS
288 scrollbar_ev.stop (display);
289#endif
290#ifdef MENUBAR
291 menubar_ev.stop (display);
292#endif
293 } 299 }
294 300
295 check_ev.stop (); 301 check_ev.stop ();
296 pty_ev.stop (); 302 pty_ev.stop ();
297#ifdef CURSOR_BLINK 303#ifdef CURSOR_BLINK
886 resize_all_windows (0, 0, 0); 892 resize_all_windows (0, 0, 0);
887 scr_remap_chars (); 893 scr_remap_chars ();
888 scr_touch (true); 894 scr_touch (true);
889 } 895 }
890 896
897 for (unicode_t ch = 0x20; ch <= 0x7f; ch++)
898 TermWin.ascii_map [ch - 0x20] = fs->find_font (ch);
899
891 return true; 900 return true;
892 } 901 }
893 } 902 }
894 903
895 return false; 904 return false;
975 } 984 }
976 985
977 if (!rXParseAllocColor (& xcol, color)) 986 if (!rXParseAllocColor (& xcol, color))
978 return; 987 return;
979 988
980 /* XStoreColor (display->display, XCMAP, XColor*); */ 989 /* XStoreColor (display->display, display->cmap, XColor*); */
981 990
982 /* 991 /*
983 * FIXME: should free colors here, but no idea how to do it so instead, 992 * FIXME: should free colors here, but no idea how to do it so instead,
984 * so just keep gobbling up the colormap 993 * so just keep gobbling up the colormap
985 */ 994 */
988 if (PixColors[idx] == PixColors[i]) 997 if (PixColors[idx] == PixColors[i])
989 break; 998 break;
990 if (i > Color_White) 999 if (i > Color_White)
991 { 1000 {
992 /* fprintf (stderr, "XFreeColors: PixColors [%d] = %lu\n", idx, PixColors [idx]); */ 1001 /* fprintf (stderr, "XFreeColors: PixColors [%d] = %lu\n", idx, PixColors [idx]); */
993 XFreeColors (display->display, XCMAP, (PixColors + idx), 1, 1002 XFreeColors (display->display, display->cmap, (PixColors + idx), 1,
994 DisplayPlanes (display->display, display->screen)); 1003 DisplayPlanes (display->display, display->screen));
995 } 1004 }
996# endif 1005# endif
997 1006
998 PixColorsFocused[idx] = xcol; 1007 PixColorsFocused[idx] = xcol;
1023{ 1032{
1024 XColor xcol[2]; 1033 XColor xcol[2];
1025 1034
1026 xcol[0].pixel = ISSET_PIXCOLOR (Color_pointer_fg) ? PixColorsFocused[Color_pointer_fg] : PixColorsFocused[Color_fg]; 1035 xcol[0].pixel = ISSET_PIXCOLOR (Color_pointer_fg) ? PixColorsFocused[Color_pointer_fg] : PixColorsFocused[Color_fg];
1027 xcol[1].pixel = ISSET_PIXCOLOR (Color_pointer_bg) ? PixColorsFocused[Color_pointer_bg] : PixColorsFocused[Color_bg]; 1036 xcol[1].pixel = ISSET_PIXCOLOR (Color_pointer_bg) ? PixColorsFocused[Color_pointer_bg] : PixColorsFocused[Color_bg];
1028 XQueryColors (display->display, XCMAP, xcol, 2); 1037 XQueryColors (display->display, display->cmap, xcol, 2);
1029 XRecolorCursor (display->display, TermWin_cursor, xcol + 0, xcol + 1); 1038 XRecolorCursor (display->display, TermWin_cursor, xcol + 0, xcol + 1);
1030} 1039}
1031 1040
1032/*----------------------------------------------------------------------*/ 1041/*----------------------------------------------------------------------*/
1033/* 1042/*

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines