… | |
… | |
1164 | } |
1164 | } |
1165 | |
1165 | |
1166 | void |
1166 | void |
1167 | rxvt_term::pointer_unblank () |
1167 | rxvt_term::pointer_unblank () |
1168 | { |
1168 | { |
1169 | XDefineCursor (display->display, vt, TermWin_cursor); |
1169 | XDefineCursor (xdisp, vt, TermWin_cursor); |
1170 | recolour_cursor (); |
1170 | recolour_cursor (); |
1171 | |
1171 | |
1172 | #ifdef POINTER_BLANK |
1172 | #ifdef POINTER_BLANK |
1173 | hidden_pointer = 0; |
1173 | hidden_pointer = 0; |
1174 | |
1174 | |
… | |
… | |
1182 | rxvt_term::pointer_blank () |
1182 | rxvt_term::pointer_blank () |
1183 | { |
1183 | { |
1184 | if (!OPTION (Opt_pointerBlank)) |
1184 | if (!OPTION (Opt_pointerBlank)) |
1185 | return; |
1185 | return; |
1186 | |
1186 | |
1187 | XDefineCursor (display->display, vt, display->blank_cursor); |
1187 | XDefineCursor (xdisp, vt, display->blank_cursor); |
1188 | XFlush (display->display); |
1188 | XFlush (xdisp); |
1189 | |
1189 | |
1190 | hidden_pointer = 1; |
1190 | hidden_pointer = 1; |
1191 | } |
1191 | } |
1192 | |
1192 | |
1193 | void |
1193 | void |
… | |
… | |
2531 | XFreePixmap (xdisp, pixmap); |
2531 | XFreePixmap (xdisp, pixmap); |
2532 | |
2532 | |
2533 | #if TINTING |
2533 | #if TINTING |
2534 | if (ISSET_PIXCOLOR (Color_tint)) |
2534 | if (ISSET_PIXCOLOR (Color_tint)) |
2535 | { |
2535 | { |
2536 | unsigned short rm, gm, bm; |
2536 | rxvt_rgba c; |
2537 | int shade = rs[Rs_shade] ? atoi (rs[Rs_shade]) : 100; |
2537 | int shade = rs[Rs_shade] ? atoi (rs[Rs_shade]) : 100; |
2538 | |
2538 | |
2539 | pix_colors_focused[Color_tint].get (this, rm, gm, bm); |
2539 | pix_colors_focused[Color_tint].get (this, c); |
2540 | |
2540 | |
2541 | ShadeXImage (this, image, shade, rm, gm, bm); |
2541 | ShadeXImage (this, image, shade, c.r, c.g, c.b); |
2542 | } |
2542 | } |
2543 | #endif |
2543 | #endif |
2544 | |
2544 | |
2545 | pixmap = XCreatePixmap (xdisp, vt, szHint.width, szHint.height, image->depth); |
2545 | pixmap = XCreatePixmap (xdisp, vt, szHint.width, szHint.height, image->depth); |
2546 | gc = XCreateGC (xdisp, vt, 0UL, &gcvalue); |
2546 | gc = XCreateGC (xdisp, vt, 0UL, &gcvalue); |
… | |
… | |
3278 | { |
3278 | { |
3279 | case '>': |
3279 | case '>': |
3280 | if (ch == CSI_DA) /* secondary device attributes */ |
3280 | if (ch == CSI_DA) /* secondary device attributes */ |
3281 | { |
3281 | { |
3282 | // first parameter is normally 0 for vt100, 1 for some newer vtxxx, 'R' for rxvt, |
3282 | // first parameter is normally 0 for vt100, 1 for some newer vtxxx, 'R' for rxvt, |
3283 | // 'U' for rxvt-unicode <= 7.2, and Mm85 (e.g. 7385 for 7.3) for later versions. |
3283 | // 'U' for rxvt-unicode != 7.[34] (where it was broken). |
3284 | // |
3284 | // |
3285 | // second parameter is xterm patch level for xterm, MMmmpp (e.g. 20703) for rxvt |
3285 | // second parameter is xterm patch level for xterm, MMmmpp (e.g. 20703) for rxvt |
3286 | // and Mm (e.g. 72 for 7.2) for urxvt <= 7.2, and 94 for later versions, to signify |
3286 | // and Mm (e.g. 72 for 7.2) for urxvt <= 7.2, and 94 for later versions, to signify |
3287 | // that we do not support xterm mouse reporting (should be 95 when we do). |
3287 | // that we do not support xterm mouse reporting (should be 95 when we do). |
3288 | // |
3288 | // |
3289 | tt_printf ("\033[>%c%c85;94;0c", VERSION[0], VERSION[1]); |
3289 | tt_printf ("\033[>%d;94;0c", 'U'); |
3290 | } |
3290 | } |
3291 | break; |
3291 | break; |
3292 | case '?': |
3292 | case '?': |
3293 | if (ch == 'h' || ch == 'l' || ch == 'r' || ch == 's' || ch == 't') |
3293 | if (ch == 'h' || ch == 'l' || ch == 'r' || ch == 's' || ch == 't') |
3294 | process_terminal_mode (ch, priv, nargs, arg); |
3294 | process_terminal_mode (ch, priv, nargs, arg); |
… | |
… | |
3714 | void |
3714 | void |
3715 | rxvt_term::process_color_seq (int report, int color, const char *str, char resp) |
3715 | rxvt_term::process_color_seq (int report, int color, const char *str, char resp) |
3716 | { |
3716 | { |
3717 | if (str[0] == '?' && !str[1]) |
3717 | if (str[0] == '?' && !str[1]) |
3718 | { |
3718 | { |
3719 | unsigned short r, g, b; |
3719 | rxvt_rgba c; |
3720 | pix_colors_focused[color].get (this, r, g, b); |
3720 | pix_colors_focused[color].get (this, c); |
|
|
3721 | |
|
|
3722 | #if XFT |
|
|
3723 | if (c.a != rxvt_rgba::MAX_CC) |
|
|
3724 | tt_printf ("\033]%d;rgba:%04x/%04x/%04x/%04x%c", report, c.a, c.r, c.g, c.b, resp); |
|
|
3725 | else |
|
|
3726 | #endif |
3721 | tt_printf ("\033]%d;rgb:%04x/%04x/%04x%c", report, r, g, b, resp); |
3727 | tt_printf ("\033]%d;rgb:%04x/%04x/%04x%c", report, c.r, c.g, c.b, resp); |
3722 | } |
3728 | } |
3723 | else |
3729 | else |
3724 | set_window_color (color, str); |
3730 | set_window_color (color, str); |
3725 | } |
3731 | } |
3726 | |
3732 | |
… | |
… | |
3767 | &nitems, &bytes_after, &value) == Success |
3773 | &nitems, &bytes_after, &value) == Success |
3768 | && actual_type != None |
3774 | && actual_type != None |
3769 | && actual_format == 8) |
3775 | && actual_format == 8) |
3770 | str = (const char *)(value); |
3776 | str = (const char *)(value); |
3771 | |
3777 | |
3772 | tt_printf ("\033]%d;%s%c", XTerm_property, str, resp); |
3778 | tt_printf ("\033]%d;%s%c", op, str, resp); |
3773 | |
3779 | |
3774 | XFree (value); |
3780 | XFree (value); |
3775 | } |
3781 | } |
3776 | else |
3782 | else |
3777 | { |
3783 | { |
… | |
… | |
3801 | break; |
3807 | break; |
3802 | |
3808 | |
3803 | if ((buf = strchr (name, ';')) != NULL) |
3809 | if ((buf = strchr (name, ';')) != NULL) |
3804 | *buf++ = '\0'; |
3810 | *buf++ = '\0'; |
3805 | |
3811 | |
3806 | if (name[0] == '?' && !name[1]) |
3812 | process_color_seq (op, color, name, resp); |
3807 | { |
|
|
3808 | unsigned short r, g, b; |
|
|
3809 | pix_colors_focused[color].get (this, r, g, b); |
|
|
3810 | tt_printf ("\033]%d;%d;rgb:%04x/%04x/%04x%c", XTerm_Color, color, r, g, b, resp); |
|
|
3811 | } |
|
|
3812 | else |
|
|
3813 | set_window_color (color, name); |
|
|
3814 | } |
3813 | } |
3815 | break; |
3814 | break; |
3816 | case XTerm_Color00: |
3815 | case XTerm_Color00: |
3817 | process_color_seq (XTerm_Color00, Color_fg, str, resp); |
3816 | process_color_seq (op, Color_fg, str, resp); |
3818 | break; |
3817 | break; |
3819 | case XTerm_Color01: |
3818 | case XTerm_Color01: |
3820 | process_color_seq (XTerm_Color01, Color_bg, str, resp); |
3819 | process_color_seq (op, Color_bg, str, resp); |
3821 | break; |
3820 | break; |
3822 | #ifndef NO_CURSORCOLOR |
3821 | #ifndef NO_CURSORCOLOR |
3823 | case XTerm_Color_cursor: |
3822 | case XTerm_Color_cursor: |
3824 | process_color_seq (XTerm_Color_cursor, Color_cursor, str, resp); |
3823 | process_color_seq (op, Color_cursor, str, resp); |
3825 | break; |
3824 | break; |
3826 | #endif |
3825 | #endif |
3827 | case XTerm_Color_pointer_fg: |
3826 | case XTerm_Color_pointer_fg: |
3828 | process_color_seq (XTerm_Color_pointer_fg, Color_pointer_fg, str, resp); |
3827 | process_color_seq (op, Color_pointer_fg, str, resp); |
3829 | break; |
3828 | break; |
3830 | case XTerm_Color_pointer_bg: |
3829 | case XTerm_Color_pointer_bg: |
3831 | process_color_seq (XTerm_Color_pointer_bg, Color_pointer_bg, str, resp); |
3830 | process_color_seq (op, Color_pointer_bg, str, resp); |
3832 | break; |
3831 | break; |
3833 | #ifndef NO_BOLD_UNDERLINE_REVERSE |
3832 | #ifndef NO_BOLD_UNDERLINE_REVERSE |
3834 | case XTerm_Color_RV: |
3833 | case XTerm_Color_RV: |
3835 | process_color_seq (XTerm_Color_RV, Color_RV, str, resp); |
3834 | process_color_seq (op, Color_RV, str, resp); |
3836 | break; |
3835 | break; |
3837 | case Rxvt_Color_BD: |
3836 | case Rxvt_Color_BD: |
3838 | case URxvt_Color_BD: |
3837 | case URxvt_Color_BD: |
3839 | process_color_seq (op, Color_BD, str, resp); |
3838 | process_color_seq (op, Color_BD, str, resp); |
3840 | break; |
3839 | break; |
3841 | case Rxvt_Color_UL: |
3840 | case Rxvt_Color_UL: |
3842 | case URxvt_Color_UL: |
3841 | case URxvt_Color_UL: |
3843 | process_color_seq (op, Color_UL, str, resp); |
3842 | process_color_seq (op, Color_UL, str, resp); |
3844 | break; |
3843 | break; |
3845 | case URxvt_Color_IT: |
3844 | case URxvt_Color_IT: |
3846 | process_color_seq (URxvt_Color_IT, Color_IT, str, resp); |
3845 | process_color_seq (op, Color_IT, str, resp); |
3847 | break; |
3846 | break; |
3848 | #endif |
3847 | #endif |
3849 | #if TRANSPARENT && TINTING |
3848 | #if TRANSPARENT && TINTING |
3850 | case URxvt_Color_tint: |
3849 | case URxvt_Color_tint: |
3851 | process_color_seq (URxvt_Color_tint, Color_tint, str, resp); |
3850 | process_color_seq (op, Color_tint, str, resp); |
3852 | check_our_parents (); |
3851 | check_our_parents (); |
3853 | if (am_transparent) |
3852 | if (am_transparent) |
3854 | want_full_refresh = want_refresh = 1; |
3853 | want_full_refresh = want_refresh = 1; |
3855 | break; |
3854 | break; |
3856 | #endif |
3855 | #endif |
… | |
… | |
3930 | allocated.push_back ((void *)res); |
3929 | allocated.push_back ((void *)res); |
3931 | set_fonts (); |
3930 | set_fonts (); |
3932 | } |
3931 | } |
3933 | break; |
3932 | break; |
3934 | |
3933 | |
|
|
3934 | case URxvt_version: |
|
|
3935 | if (query) |
|
|
3936 | tt_printf ("\33]%d;rxvt-unicode;%-.20s;%c;%c%c", |
|
|
3937 | op, |
|
|
3938 | rs[Rs_name], VERSION[0], VERSION[2], |
|
|
3939 | resp); |
|
|
3940 | break; |
|
|
3941 | |
3935 | #if ENABLE_FRILLS |
3942 | #if ENABLE_FRILLS |
3936 | case URxvt_locale: |
3943 | case URxvt_locale: |
3937 | if (query) |
3944 | if (query) |
3938 | tt_printf ("\33]%d;%-.250s%c", URxvt_locale, OPTION (Opt_insecure) ? locale : "", resp); |
3945 | tt_printf ("\33]%d;%-.250s%c", op, OPTION (Opt_insecure) ? locale : "", resp); |
3939 | else |
3946 | else |
3940 | { |
3947 | { |
3941 | set_locale (str); |
3948 | set_locale (str); |
3942 | pty->set_utf8_mode (enc_utf8); |
3949 | pty->set_utf8_mode (enc_utf8); |
3943 | init_xlocale (); |
3950 | init_xlocale (); |