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