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