… | |
… | |
519 | # endif |
519 | # endif |
520 | return; |
520 | return; |
521 | } |
521 | } |
522 | else |
522 | else |
523 | { |
523 | { |
524 | # if ENABLE_OVERLAY |
524 | # if ISO_14755 |
525 | scr_overlay_off (); |
525 | scr_overlay_off (); |
526 | # endif |
526 | # endif |
527 | iso14755buf = 0; |
527 | iso14755buf = 0; |
528 | } |
528 | } |
529 | } |
529 | } |
530 | else if ((ctrl && (keysym == XK_Shift_L || keysym == XK_Shift_R)) |
530 | else if ((ctrl && (keysym == XK_Shift_L || keysym == XK_Shift_R)) |
531 | || (shft && (keysym == XK_Control_L || keysym == XK_Control_R))) |
531 | || (shft && (keysym == XK_Control_L || keysym == XK_Control_R))) |
532 | if (!(iso14755buf & ISO_14755_STARTED)) |
532 | if (!(iso14755buf & ISO_14755_STARTED)) |
533 | { |
533 | { |
534 | iso14755buf |= ISO_14755_STARTED; |
534 | iso14755buf |= ISO_14755_STARTED; |
535 | # if ENABLE_OVERLAY |
535 | # if ISO_14755 |
536 | scr_overlay_new (0, -1, sizeof ("ISO 14755 mode") - 1, 1); |
536 | scr_overlay_new (0, -1, sizeof ("ISO 14755 mode") - 1, 1); |
537 | scr_overlay_set (0, 0, "ISO 14755 mode"); |
537 | scr_overlay_set (0, 0, "ISO 14755 mode"); |
538 | # endif |
538 | # endif |
539 | } |
539 | } |
540 | #endif |
540 | #endif |
… | |
… | |
728 | |
728 | |
729 | case XK_Find: |
729 | case XK_Find: |
730 | strcpy (kbuf, "\033[1~"); |
730 | strcpy (kbuf, "\033[1~"); |
731 | break; |
731 | break; |
732 | |
732 | |
733 | #ifdef XK_KP_End |
733 | #ifdef XK_KP_Insert |
734 | case XK_KP_Insert: |
734 | case XK_KP_Insert: |
735 | /* allow shift to override */ |
735 | /* allow shift to override */ |
736 | if ((priv_modes & PrivMode_aplKP) ? !shft : shft) |
736 | if ((priv_modes & PrivMode_aplKP) ? !shft : shft) |
737 | { |
737 | { |
738 | strcpy (kbuf, "\033Op"); |
738 | strcpy (kbuf, "\033Op"); |
… | |
… | |
934 | #if ENABLE_FRILLS || ISO_14755 |
934 | #if ENABLE_FRILLS || ISO_14755 |
935 | // ISO 14755 support |
935 | // ISO 14755 support |
936 | if (iso14755buf) |
936 | if (iso14755buf) |
937 | if (iso14755buf & ISO_14755_52) |
937 | if (iso14755buf & ISO_14755_52) |
938 | { |
938 | { |
939 | # if ENABLE_OVERLAY |
939 | # if ISO_14755 |
940 | scr_overlay_off (); |
940 | scr_overlay_off (); |
941 | # endif |
941 | # endif |
942 | # if ISO_14755 |
942 | # if ISO_14755 |
943 | // iso14755 part 5.2 handling: release time |
943 | // iso14755 part 5.2 handling: release time |
944 | // first: controls |
944 | // first: controls |
… | |
… | |
967 | |
967 | |
968 | return; |
968 | return; |
969 | } |
969 | } |
970 | else if ((ev.state & (ShiftMask | ControlMask)) != (ShiftMask | ControlMask)) |
970 | else if ((ev.state & (ShiftMask | ControlMask)) != (ShiftMask | ControlMask)) |
971 | { |
971 | { |
972 | # if ENABLE_OVERLAY |
972 | # if ISO_14755 |
973 | scr_overlay_off (); |
973 | scr_overlay_off (); |
974 | # endif |
974 | # endif |
975 | if (iso14755buf & ISO_14755_51) |
975 | if (iso14755buf & ISO_14755_51) |
976 | commit_iso14755 (); |
976 | commit_iso14755 (); |
977 | #if ISO_14755 |
977 | #if ISO_14755 |
… | |
… | |
1035 | void |
1035 | void |
1036 | rxvt_term::flush () |
1036 | rxvt_term::flush () |
1037 | { |
1037 | { |
1038 | flush_ev.stop (); |
1038 | flush_ev.stop (); |
1039 | |
1039 | |
1040 | #ifdef TRANSPARENT |
1040 | #ifdef ENABLE_TRANSPARENCY |
1041 | if (want_full_refresh) |
1041 | if (want_full_refresh) |
1042 | { |
1042 | { |
1043 | want_full_refresh = 0; |
1043 | want_full_refresh = 0; |
1044 | scr_clear (); |
1044 | scr_clear (); |
1045 | scr_touch (false); |
1045 | scr_touch (false); |
… | |
… | |
1433 | else if (ev.xclient.data.l[1] == XEMBED_FOCUS_OUT) |
1433 | else if (ev.xclient.data.l[1] == XEMBED_FOCUS_OUT) |
1434 | focus_out (); |
1434 | focus_out (); |
1435 | } |
1435 | } |
1436 | #endif |
1436 | #endif |
1437 | } |
1437 | } |
1438 | break; |
|
|
1439 | |
|
|
1440 | case MappingNotify: |
|
|
1441 | XRefreshKeyboardMapping (&ev.xmapping); |
|
|
1442 | break; |
1438 | break; |
1443 | |
1439 | |
1444 | /* |
1440 | /* |
1445 | * XXX: this is not the _current_ arrangement |
1441 | * XXX: this is not the _current_ arrangement |
1446 | * Here's my conclusion: |
1442 | * Here's my conclusion: |
… | |
… | |
1499 | #endif |
1495 | #endif |
1500 | } |
1496 | } |
1501 | |
1497 | |
1502 | HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END)); |
1498 | HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END)); |
1503 | |
1499 | |
1504 | #ifdef TRANSPARENT |
1500 | #ifdef ENABLE_TRANSPARENCY |
1505 | if (option (Opt_transparent)) |
1501 | if (option (Opt_transparent)) |
1506 | check_our_parents (); |
1502 | check_our_parents (); |
1507 | #endif |
1503 | #endif |
1508 | } |
1504 | } |
1509 | break; |
1505 | break; |
… | |
… | |
1543 | text_blink_ev.stop (); |
1539 | text_blink_ev.stop (); |
1544 | #endif |
1540 | #endif |
1545 | HOOK_INVOKE ((this, HOOK_UNMAP_NOTIFY, DT_XEVENT, &ev, DT_END)); |
1541 | HOOK_INVOKE ((this, HOOK_UNMAP_NOTIFY, DT_XEVENT, &ev, DT_END)); |
1546 | break; |
1542 | break; |
1547 | |
1543 | |
1548 | #ifdef TRANSPARENT |
1544 | #ifdef ENABLE_TRANSPARENCY |
1549 | case ReparentNotify: |
1545 | case ReparentNotify: |
1550 | rootwin_cb (ev); |
1546 | rootwin_cb (ev); |
1551 | break; |
1547 | break; |
1552 | #endif /* TRANSPARENT */ |
1548 | #endif /* ENABLE_TRANSPARENCY */ |
1553 | |
1549 | |
1554 | case GraphicsExpose: |
1550 | case GraphicsExpose: |
1555 | case Expose: |
1551 | case Expose: |
1556 | if (ev.xany.window == vt) |
1552 | if (ev.xany.window == vt) |
1557 | { |
1553 | { |
… | |
… | |
1581 | { |
1577 | { |
1582 | scrollBar.setIdle (); |
1578 | scrollBar.setIdle (); |
1583 | scrollbar_show (0); |
1579 | scrollbar_show (0); |
1584 | } |
1580 | } |
1585 | |
1581 | |
1586 | #ifdef TRANSPARENT |
1582 | #ifdef ENABLE_TRANSPARENCY |
1587 | if (am_transparent && ev.xany.window == parent[0]) |
1583 | if (am_transparent && ev.xany.window == parent[0]) |
1588 | XClearWindow (dpy, ev.xany.window); |
1584 | XClearWindow (dpy, ev.xany.window); |
1589 | #endif |
1585 | #endif |
1590 | } |
1586 | } |
1591 | break; |
1587 | break; |
… | |
… | |
1783 | |
1779 | |
1784 | #if ENABLE_FRILLS || ISO_14755 |
1780 | #if ENABLE_FRILLS || ISO_14755 |
1785 | if (iso14755buf) |
1781 | if (iso14755buf) |
1786 | { |
1782 | { |
1787 | iso14755buf = 0; |
1783 | iso14755buf = 0; |
1788 | # if ENABLE_OVERLAY |
1784 | # if ISO_14755 |
1789 | scr_overlay_off (); |
1785 | scr_overlay_off (); |
1790 | # endif |
1786 | # endif |
1791 | } |
1787 | } |
1792 | #endif |
1788 | #endif |
1793 | #if USE_XIM |
1789 | #if USE_XIM |
… | |
… | |
1820 | pix_colors_focused [idx].fade (this, atoi (rs[Rs_fade]), pix_colors_unfocused [idx], c); |
1816 | pix_colors_focused [idx].fade (this, atoi (rs[Rs_fade]), pix_colors_unfocused [idx], c); |
1821 | } |
1817 | } |
1822 | #endif |
1818 | #endif |
1823 | } |
1819 | } |
1824 | |
1820 | |
1825 | #if TRANSPARENT || ENABLE_PERL |
1821 | #if ENABLE_TRANSPARENCY || ENABLE_PERL |
1826 | void |
1822 | void |
1827 | rxvt_term::rootwin_cb (XEvent &ev) |
1823 | rxvt_term::rootwin_cb (XEvent &ev) |
1828 | { |
1824 | { |
1829 | make_current (); |
1825 | make_current (); |
1830 | |
1826 | |
1831 | if (SHOULD_INVOKE (HOOK_ROOT_EVENT) |
1827 | if (SHOULD_INVOKE (HOOK_ROOT_EVENT) |
1832 | && HOOK_INVOKE ((this, HOOK_ROOT_EVENT, DT_XEVENT, &ev, DT_END))) |
1828 | && HOOK_INVOKE ((this, HOOK_ROOT_EVENT, DT_XEVENT, &ev, DT_END))) |
1833 | return; |
1829 | return; |
1834 | |
1830 | |
1835 | # if TRANSPARENT |
1831 | # if ENABLE_TRANSPARENCY |
1836 | switch (ev.type) |
1832 | switch (ev.type) |
1837 | { |
1833 | { |
1838 | case PropertyNotify: |
1834 | case PropertyNotify: |
1839 | /* |
1835 | /* |
1840 | * if user used some Esetroot compatible prog to set the root bg, |
1836 | * if user used some Esetroot compatible prog to set the root bg, |
… | |
… | |
2293 | |
2289 | |
2294 | if (!option (Opt_jumpScroll) || refresh_count >= nrow - 1) |
2290 | if (!option (Opt_jumpScroll) || refresh_count >= nrow - 1) |
2295 | { |
2291 | { |
2296 | refresh_count = 0; |
2292 | refresh_count = 0; |
2297 | |
2293 | |
2298 | if (!option (Opt_skipScroll) || io_manager::now () > NOW + .1) |
2294 | if (!option (Opt_skipScroll) || io_manager::now () > NOW + 1. / 60.) |
2299 | { |
2295 | { |
2300 | refreshnow = true; |
2296 | refreshnow = true; |
2301 | ch = NOCHAR; |
2297 | ch = NOCHAR; |
2302 | break; |
2298 | break; |
2303 | } |
2299 | } |
… | |
… | |
2574 | process_dcs_seq (); |
2570 | process_dcs_seq (); |
2575 | break; |
2571 | break; |
2576 | case 0x9b: /* CSI */ |
2572 | case 0x9b: /* CSI */ |
2577 | process_csi_seq (); |
2573 | process_csi_seq (); |
2578 | break; |
2574 | break; |
2579 | case 0x9d: /* CSI */ |
2575 | case 0x9d: /* OSC */ |
2580 | process_osc_seq (); |
2576 | process_osc_seq (); |
2581 | break; |
2577 | break; |
2582 | #endif |
2578 | #endif |
2583 | } |
2579 | } |
2584 | } |
2580 | } |
… | |
… | |
2812 | unicode_t ch, priv, i; |
2808 | unicode_t ch, priv, i; |
2813 | unsigned int nargs, p; |
2809 | unsigned int nargs, p; |
2814 | int n, ndef; |
2810 | int n, ndef; |
2815 | int arg[ESC_ARGS]; |
2811 | int arg[ESC_ARGS]; |
2816 | |
2812 | |
2817 | for (nargs = ESC_ARGS; nargs > 0;) |
2813 | memset (arg, 0, sizeof (arg)); |
2818 | arg[--nargs] = 0; |
2814 | nargs = 0; |
2819 | |
2815 | |
2820 | priv = 0; |
2816 | priv = 0; |
2821 | ch = cmd_getc (); |
2817 | ch = cmd_getc (); |
2822 | if (ch >= '<' && ch <= '?') |
2818 | if (ch >= '<' && ch <= '?') |
2823 | { /* '<' '=' '>' '?' */ |
2819 | { /* '<' '=' '>' '?' */ |
… | |
… | |
2867 | switch (priv) |
2863 | switch (priv) |
2868 | { |
2864 | { |
2869 | case '>': |
2865 | case '>': |
2870 | if (ch == CSI_DA) /* secondary device attributes */ |
2866 | if (ch == CSI_DA) /* secondary device attributes */ |
2871 | { |
2867 | { |
2872 | // first parameter is normally 0 for vt100, 1 for some newer vtxxx, 'R' for rxvt, |
2868 | // first parameter is normally 0 for vt100, 1 for vt220, 'R' for rxvt, |
2873 | // 'U' for rxvt-unicode != 7.[34] (where it was broken). |
2869 | // 'U' for rxvt-unicode != 7.[34] (where it was broken). |
2874 | // |
2870 | // |
2875 | // second parameter is xterm patch level for xterm, MMmmpp (e.g. 20703) for rxvt |
2871 | // second parameter is xterm patch level for xterm, MMmmpp (e.g. 20703) for rxvt |
2876 | // and Mm (e.g. 72 for 7.2) for urxvt <= 7.2, and 94 for later versions, to signify |
2872 | // and Mm (e.g. 72 for 7.2) for urxvt <= 7.2, and 94 for later versions, to signify |
2877 | // that we do not support xterm mouse reporting (should be 95 when we do). |
2873 | // that we do not support xterm mouse reporting (should be 95 when we do). |
… | |
… | |
3435 | break; |
3431 | break; |
3436 | case URxvt_Color_IT: |
3432 | case URxvt_Color_IT: |
3437 | process_color_seq (op, Color_IT, str, resp); |
3433 | process_color_seq (op, Color_IT, str, resp); |
3438 | break; |
3434 | break; |
3439 | #endif |
3435 | #endif |
3440 | #if TRANSPARENT && TINTING |
3436 | #if ENABLE_TRANSPARENCY && TINTING |
3441 | case URxvt_Color_tint: |
3437 | case URxvt_Color_tint: |
3442 | process_color_seq (op, Color_tint, str, resp); |
3438 | process_color_seq (op, Color_tint, str, resp); |
3443 | |
3439 | |
3444 | check_our_parents (); |
3440 | check_our_parents (); |
3445 | |
3441 | |
… | |
… | |
3475 | #ifdef XPM_BACKGROUND |
3471 | #ifdef XPM_BACKGROUND |
3476 | resize_pixmap (); |
3472 | resize_pixmap (); |
3477 | scr_touch (true); |
3473 | scr_touch (true); |
3478 | #endif |
3474 | #endif |
3479 | } |
3475 | } |
3480 | #if TRANSPARENT && defined(HAVE_AFTERIMAGE) |
3476 | #if ENABLE_TRANSPARENCY && defined(HAVE_AFTERIMAGE) |
3481 | if (option (Opt_transparent)) |
3477 | if (option (Opt_transparent)) |
3482 | check_our_parents (); |
3478 | check_our_parents (); |
3483 | #endif |
3479 | #endif |
3484 | } |
3480 | } |
3485 | break; |
3481 | break; |