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.220 by root, Sat Feb 11 10:53:37 2006 UTC vs.
Revision 1.226 by root, Thu Jul 6 23:48:11 2006 UTC

1/*--------------------------------*-C-*---------------------------------* 1/*----------------------------------------------------------------------*
2 * File: main.C 2 * File: main.C
3 *----------------------------------------------------------------------* 3 *----------------------------------------------------------------------*
4 * 4 *
5 * All portions of code are copyright by their respective author/s. 5 * All portions of code are copyright by their respective author/s.
6 * Copyright (c) 1992 John Bovey, University of Kent at Canterbury <jdb@ukc.ac.uk> 6 * Copyright (c) 1992 John Bovey, University of Kent at Canterbury <jdb@ukc.ac.uk>
143} 143}
144#endif 144#endif
145 145
146rxvt_term::rxvt_term () 146rxvt_term::rxvt_term ()
147 : 147 :
148#if TRANSPARENT 148#if TRANSPARENT || ENABLE_PERL
149 rootwin_ev (this, &rxvt_term::rootwin_cb), 149 rootwin_ev (this, &rxvt_term::rootwin_cb),
150#endif 150#endif
151#ifdef HAVE_SCROLLBARS 151#ifdef HAVE_SCROLLBARS
152 scrollbar_ev (this, &rxvt_term::x_cb), 152 scrollbar_ev (this, &rxvt_term::x_cb),
153#endif 153#endif
198void rxvt_term::emergency_cleanup () 198void rxvt_term::emergency_cleanup ()
199{ 199{
200 if (cmd_pid) 200 if (cmd_pid)
201 kill (-cmd_pid, SIGHUP); 201 kill (-cmd_pid, SIGHUP);
202 202
203 pty_ev.stop ();
203 delete pty; pty = 0; 204 delete pty; pty = 0;
204} 205}
205 206
206rxvt_term::~rxvt_term () 207rxvt_term::~rxvt_term ()
207{ 208{
325 im_ev.stop (display); 326 im_ev.stop (display);
326#endif 327#endif
327#if HAVE_SCROLLBARS 328#if HAVE_SCROLLBARS
328 scrollbar_ev.stop (display); 329 scrollbar_ev.stop (display);
329#endif 330#endif
330#if TRANSPARENT 331#if TRANSPARENT || ENABLE_PERL
331 rootwin_ev.stop (display); 332 rootwin_ev.stop (display);
332#endif 333#endif
333 incr_ev.stop (); 334 incr_ev.stop ();
334 termwin_ev.stop (display); 335 termwin_ev.stop (display);
335 vt_ev.stop (display); 336 vt_ev.stop (display);
503 XSelectInput (dpy, display->root, PropertyChangeMask); 504 XSelectInput (dpy, display->root, PropertyChangeMask);
504 check_our_parents (); 505 check_our_parents ();
505 rootwin_ev.start (display, display->root); 506 rootwin_ev.start (display, display->root);
506 } 507 }
507#endif 508#endif
509#if ENABLE_PERL
510 rootwin_ev.start (display, display->root);
511#endif
508 512
509 set_colorfgbg (); 513 set_colorfgbg ();
510 514
511 init_command (cmd_argv); 515 init_command (cmd_argv);
512 516
935 pix_colors_focused[idx] = xcol; 939 pix_colors_focused[idx] = xcol;
936 940
937 /* XSetWindowAttributes attr; */ 941 /* XSetWindowAttributes attr; */
938 /* Cursor cursor; */ 942 /* Cursor cursor; */
939done: 943done:
940
941#if OFF_FOCUS_FADING
942 if (rs[Rs_fade])
943 {
944 rgba c;
945 pix_colors [Color_fade].get (c);
946 pix_colors_focused [idx].fade (this, atoi (rs[Rs_fade]), pix_colors_unfocused [idx], c);
947 }
948#endif
949
950 /*TODO: handle Color_BD, scrollbar background, etc. */ 944 /*TODO: handle Color_BD, scrollbar background, etc. */
951 945
946 update_fade_color (idx);
952 recolour_cursor (); 947 recolour_cursor ();
953 scr_recolour (); 948 scr_recolour ();
954} 949}
955 950
956#else 951#else
1621 || !focus 1616 || !focus
1622 || !(input_style & (XIMPreeditArea | XIMPreeditPosition)) 1617 || !(input_style & (XIMPreeditArea | XIMPreeditPosition))
1623 || !IMisRunning ()) 1618 || !IMisRunning ())
1624 return; 1619 return;
1625 1620
1621 if (input_style & XIMPreeditPosition)
1622 {
1623 im_set_size (preedit_rect);
1624 preedit_attr = XVaCreateNestedList (0, XNArea, &preedit_rect, NULL);
1625
1626 XSetICValues (Input_Context,
1627 XNPreeditAttributes, preedit_attr, NULL);
1628 }
1629 else
1630 {
1626 /* Getting the necessary width of preedit area */ 1631 /* Getting the necessary width of preedit area */
1627 status_attr = XVaCreateNestedList (0, XNAreaNeeded, &needed_rect, NULL); 1632 status_attr = XVaCreateNestedList (0, XNAreaNeeded, &needed_rect, NULL);
1628 XGetICValues (Input_Context, XNStatusAttributes, status_attr, NULL); 1633 XGetICValues (Input_Context, XNStatusAttributes, status_attr, NULL);
1629 XFree (status_attr); 1634 XFree (status_attr);
1630 1635
1631 im_set_preedit_area (preedit_rect, status_rect, *needed_rect); 1636 im_set_preedit_area (preedit_rect, status_rect, *needed_rect);
1632 XFree (needed_rect); 1637 XFree (needed_rect);
1633 1638
1634 preedit_attr = XVaCreateNestedList (0, XNArea, &preedit_rect, NULL); 1639 preedit_attr = XVaCreateNestedList (0, XNArea, &preedit_rect, NULL);
1635 status_attr = XVaCreateNestedList (0, XNArea, &status_rect, NULL); 1640 status_attr = XVaCreateNestedList (0, XNArea, &status_rect, NULL);
1636 1641
1637 XSetICValues (Input_Context, 1642 XSetICValues (Input_Context,
1638 XNPreeditAttributes, preedit_attr, 1643 XNPreeditAttributes, preedit_attr,
1639 XNStatusAttributes, status_attr, 1644 XNStatusAttributes, status_attr,
1640 NULL); 1645 NULL);
1641 1646
1647 XFree (status_attr);
1648 }
1649
1642 XFree (preedit_attr); 1650 XFree (preedit_attr);
1643 XFree (status_attr);
1644} 1651}
1645#endif /* USE_XIM */ 1652#endif /* USE_XIM */
1646 1653
1647/*----------------------- end-of-file (C source) -----------------------*/ 1654/*----------------------- end-of-file (C source) -----------------------*/

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines