ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/command.C
(Generate patch)

Comparing rxvt-unicode/src/command.C (file contents):
Revision 1.308 by root, Mon Feb 20 19:42:55 2006 UTC vs.
Revision 1.316 by root, Thu Dec 7 20:59:59 2006 UTC

1/*--------------------------------*-C-*---------------------------------* 1/*----------------------------------------------------------------------*
2 * File: command.C 2 * File: command.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>
1458 break; 1458 break;
1459 } 1459 }
1460 break; 1460 break;
1461 1461
1462 case FocusIn: 1462 case FocusIn:
1463 if (ev.xfocus.detail != NotifyInferior && ev.xfocus.detail != NotifyPointer)
1463 focus_in (); 1464 focus_in ();
1464 break; 1465 break;
1465 1466
1466 case FocusOut: 1467 case FocusOut:
1468 if (ev.xfocus.detail != NotifyInferior && ev.xfocus.detail != NotifyPointer)
1467 focus_out (); 1469 focus_out ();
1468 break; 1470 break;
1469 1471
1470 case ConfigureNotify: 1472 case ConfigureNotify:
1471 if (ev.xconfigure.window == parent[0]) 1473 if (ev.xconfigure.window == parent[0])
1472 { 1474 {
1775 } 1777 }
1776#endif 1778#endif
1777 } 1779 }
1778} 1780}
1779 1781
1780#if TRANSPARENT 1782void
1783rxvt_term::update_fade_color (unsigned int idx)
1784{
1785#if OFF_FOCUS_FADING
1786 if (rs[Rs_fade])
1787 {
1788 rgba c;
1789 pix_colors [Color_fade].get (c);
1790 pix_colors_focused [idx].fade (this, atoi (rs[Rs_fade]), pix_colors_unfocused [idx], c);
1791 }
1792#endif
1793}
1794
1795#if TRANSPARENT || ENABLE_PERL
1781void 1796void
1782rxvt_term::rootwin_cb (XEvent &ev) 1797rxvt_term::rootwin_cb (XEvent &ev)
1783{ 1798{
1784 make_current (); 1799 make_current ();
1785 1800
1801 if (SHOULD_INVOKE (HOOK_ROOT_EVENT)
1802 && HOOK_INVOKE ((this, HOOK_ROOT_EVENT, DT_XEVENT, &ev, DT_END)))
1803 return;
1804
1805# if TRANSPARENT
1786 switch (ev.type) 1806 switch (ev.type)
1787 { 1807 {
1788 case PropertyNotify: 1808 case PropertyNotify:
1789 /* 1809 /*
1790 * if user used some Esetroot compatible prog to set the root bg, 1810 * if user used some Esetroot compatible prog to set the root bg,
1798 case ReparentNotify: 1818 case ReparentNotify:
1799 if (OPTION (Opt_transparent) && check_our_parents () && am_transparent) 1819 if (OPTION (Opt_transparent) && check_our_parents () && am_transparent)
1800 want_refresh = want_full_refresh = 1; 1820 want_refresh = want_full_refresh = 1;
1801 break; 1821 break;
1802 } 1822 }
1823# endif
1803} 1824}
1804#endif 1825#endif
1805 1826
1806void 1827void
1807rxvt_term::button_press (XButtonEvent &ev) 1828rxvt_term::button_press (XButtonEvent &ev)
2765 if (OPTION (Opt_jumpScroll) && refresh_limit < REFRESH_PERIOD) 2786 if (OPTION (Opt_jumpScroll) && refresh_limit < REFRESH_PERIOD)
2766 refresh_limit++; 2787 refresh_limit++;
2767 else 2788 else
2768 { 2789 {
2769 flag = true; 2790 flag = true;
2791 //TODO: due to popular request, implement "skipscroll" option here
2770 scr_refresh (); 2792 scr_refresh ();
2771 want_refresh = 1; 2793 want_refresh = 1;
2772 } 2794 }
2773 } 2795 }
2774 2796
3654 seen_esc = true; 3676 seen_esc = true;
3655 continue; 3677 continue;
3656 } 3678 }
3657 else if (ch == C0_BEL || ch == CHAR_ST) 3679 else if (ch == C0_BEL || ch == CHAR_ST)
3658 break; 3680 break;
3681 else if (ch == C0_SYN)
3682 ch = cmd_get8 ();
3659 else if (ch < 0x20) 3683 else if (ch < 0x20)
3660 return NULL; /* other control character - exit */ 3684 return NULL; /* other control character - exit */
3661 3685
3662 seen_esc = false; 3686 seen_esc = false;
3663 3687
3664 if (n >= STRING_MAX - 1) 3688 if (n >= STRING_MAX - 1)
3665 // stop at some sane length 3689 // stop at some sane length
3666 return NULL; 3690 return NULL;
3667 3691
3668 if (ch == C0_SYN)
3669 string[n++] = cmd_get8 ();
3670 else
3671 string[n++] = ch; 3692 string[n++] = ch;
3672 } 3693 }
3673 3694
3674 string[n++] = '\0'; 3695 string[n++] = '\0';
3675 3696
3676 ends_how = (ch == 0x5c ? C0_ESC : ch); 3697 ends_how = (ch == 0x5c ? C0_ESC : ch);
3755 int saveop = op; 3776 int saveop = op;
3756 3777
3757 dLocal (Display *, dpy); 3778 dLocal (Display *, dpy);
3758 3779
3759 assert (str != NULL); 3780 assert (str != NULL);
3781
3782 if (HOOK_INVOKE ((this, HOOK_OSC_SEQ, DT_INT, op, DT_STR, str, DT_END)))
3783 return;
3784
3760 switch (op) 3785 switch (op)
3761 { 3786 {
3762 case XTerm_name: 3787 case XTerm_name:
3763 set_title (str); 3788 set_title (str);
3764 /* FALLTHROUGH */ 3789 /* FALLTHROUGH */
3981 break; 4006 break;
3982#endif 4007#endif
3983 4008
3984#if ENABLE_PERL 4009#if ENABLE_PERL
3985 case URxvt_perl: 4010 case URxvt_perl:
3986 if (HOOK_INVOKE ((this, HOOK_OSC_SEQ, DT_STR, str, DT_END))) 4011 if (HOOK_INVOKE ((this, HOOK_OSC_SEQ_PERL, DT_STR, str, DT_END)))
3987 ; // no responses yet 4012 ; // no responses yet
3988 break; 4013 break;
3989#endif 4014#endif
3990 } 4015 }
3991} 4016}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines