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.286 by root, Wed Jan 25 21:09:21 2006 UTC vs.
Revision 1.293 by root, Mon Jan 30 04:27:17 2006 UTC

227# if !UNICODE3 227# if !UNICODE3
228 if (ch >= 0x10000) 228 if (ch >= 0x10000)
229 ch = 0xfffd; 229 ch = 0xfffd;
230# endif 230# endif
231 scr_overlay_set (11, y, ch, r); 231 scr_overlay_set (11, y, ch, r);
232
233 if (WCWIDTH (ch) >= 2)
232 scr_overlay_set (12, y, NOCHAR, r); 234 scr_overlay_set (12, y, NOCHAR, r);
233 } 235 }
234 236
237// {
238// char buf[4+4+3+1];
239// snprintf (buf, sizeof (buf), "(%.4d|%.4d)", x, y);
240// scr_overlay_set (0, 0, buf);
241// }
235 scr_overlay_set (0, len , attr); 242 scr_overlay_set (0, len , attr);
236 scr_overlay_set (0, len + 1, fname); 243 scr_overlay_set (0, len + 1, fname);
237 244
238 free (fname); 245 free (fname);
239 246
2531 XFreePixmap (xdisp, pixmap); 2538 XFreePixmap (xdisp, pixmap);
2532 2539
2533#if TINTING 2540#if TINTING
2534 if (ISSET_PIXCOLOR (Color_tint)) 2541 if (ISSET_PIXCOLOR (Color_tint))
2535 { 2542 {
2536 unsigned short rm, gm, bm; 2543 rxvt_rgba c;
2537 int shade = rs[Rs_shade] ? atoi (rs[Rs_shade]) : 100; 2544 int shade = rs[Rs_shade] ? atoi (rs[Rs_shade]) : 100;
2538 2545
2539 pix_colors_focused[Color_tint].get (this, rm, gm, bm); 2546 pix_colors_focused[Color_tint].get (this, c);
2540 2547
2541 ShadeXImage (this, image, shade, rm, gm, bm); 2548 ShadeXImage (this, image, shade, c.r, c.g, c.b);
2542 } 2549 }
2543#endif 2550#endif
2544 2551
2545 pixmap = XCreatePixmap (xdisp, vt, szHint.width, szHint.height, image->depth); 2552 pixmap = XCreatePixmap (xdisp, vt, szHint.width, szHint.height, image->depth);
2546 gc = XCreateGC (xdisp, vt, 0UL, &gcvalue); 2553 gc = XCreateGC (xdisp, vt, 0UL, &gcvalue);
3278 { 3285 {
3279 case '>': 3286 case '>':
3280 if (ch == CSI_DA) /* secondary device attributes */ 3287 if (ch == CSI_DA) /* secondary device attributes */
3281 { 3288 {
3282 // first parameter is normally 0 for vt100, 1 for some newer vtxxx, 'R' for rxvt, 3289 // 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. 3290 // 'U' for rxvt-unicode != 7.[34] (where it was broken).
3284 // 3291 //
3285 // second parameter is xterm patch level for xterm, MMmmpp (e.g. 20703) for rxvt 3292 // 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 3293 // 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). 3294 // that we do not support xterm mouse reporting (should be 95 when we do).
3288 // 3295 //
3289 tt_printf ("\033[>%c%c85;94;0c", VERSION[0], VERSION[1]); 3296 tt_printf ("\033[>%d;94;0c", 'U');
3290 } 3297 }
3291 break; 3298 break;
3292 case '?': 3299 case '?':
3293 if (ch == 'h' || ch == 'l' || ch == 'r' || ch == 's' || ch == 't') 3300 if (ch == 'h' || ch == 'l' || ch == 'r' || ch == 's' || ch == 't')
3294 process_terminal_mode (ch, priv, nargs, arg); 3301 process_terminal_mode (ch, priv, nargs, arg);
3714void 3721void
3715rxvt_term::process_color_seq (int report, int color, const char *str, char resp) 3722rxvt_term::process_color_seq (int report, int color, const char *str, char resp)
3716{ 3723{
3717 if (str[0] == '?' && !str[1]) 3724 if (str[0] == '?' && !str[1])
3718 { 3725 {
3719 unsigned short r, g, b; 3726 rxvt_rgba c;
3720 pix_colors_focused[color].get (this, r, g, b); 3727 pix_colors_focused[color].get (this, c);
3728
3729#if XFT
3730 if (c.a != rxvt_rgba::MAX_CC)
3731 tt_printf ("\033]%d;rgba:%04x/%04x/%04x/%04x%c", report, c.a, c.r, c.g, c.b, resp);
3732 else
3733#endif
3721 tt_printf ("\033]%d;rgb:%04x/%04x/%04x%c", report, r, g, b, resp); 3734 tt_printf ("\033]%d;rgb:%04x/%04x/%04x%c", report, c.r, c.g, c.b, resp);
3722 } 3735 }
3723 else 3736 else
3724 set_window_color (color, str); 3737 set_window_color (color, str);
3725} 3738}
3726 3739
3767 &nitems, &bytes_after, &value) == Success 3780 &nitems, &bytes_after, &value) == Success
3768 && actual_type != None 3781 && actual_type != None
3769 && actual_format == 8) 3782 && actual_format == 8)
3770 str = (const char *)(value); 3783 str = (const char *)(value);
3771 3784
3772 tt_printf ("\033]%d;%s%c", XTerm_property, str, resp); 3785 tt_printf ("\033]%d;%s%c", op, str, resp);
3773 3786
3774 XFree (value); 3787 XFree (value);
3775 } 3788 }
3776 else 3789 else
3777 { 3790 {
3801 break; 3814 break;
3802 3815
3803 if ((buf = strchr (name, ';')) != NULL) 3816 if ((buf = strchr (name, ';')) != NULL)
3804 *buf++ = '\0'; 3817 *buf++ = '\0';
3805 3818
3806 if (name[0] == '?' && !name[1]) 3819 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 } 3820 }
3815 break; 3821 break;
3816 case XTerm_Color00: 3822 case XTerm_Color00:
3817 process_color_seq (XTerm_Color00, Color_fg, str, resp); 3823 process_color_seq (op, Color_fg, str, resp);
3818 break; 3824 break;
3819 case XTerm_Color01: 3825 case XTerm_Color01:
3820 process_color_seq (XTerm_Color01, Color_bg, str, resp); 3826 process_color_seq (op, Color_bg, str, resp);
3821 break; 3827 break;
3822#ifndef NO_CURSORCOLOR 3828#ifndef NO_CURSORCOLOR
3823 case XTerm_Color_cursor: 3829 case XTerm_Color_cursor:
3824 process_color_seq (XTerm_Color_cursor, Color_cursor, str, resp); 3830 process_color_seq (op, Color_cursor, str, resp);
3825 break; 3831 break;
3826#endif 3832#endif
3827 case XTerm_Color_pointer_fg: 3833 case XTerm_Color_pointer_fg:
3828 process_color_seq (XTerm_Color_pointer_fg, Color_pointer_fg, str, resp); 3834 process_color_seq (op, Color_pointer_fg, str, resp);
3829 break; 3835 break;
3830 case XTerm_Color_pointer_bg: 3836 case XTerm_Color_pointer_bg:
3831 process_color_seq (XTerm_Color_pointer_bg, Color_pointer_bg, str, resp); 3837 process_color_seq (op, Color_pointer_bg, str, resp);
3832 break; 3838 break;
3833#ifndef NO_BOLD_UNDERLINE_REVERSE 3839#ifndef NO_BOLD_UNDERLINE_REVERSE
3834 case XTerm_Color_RV: 3840 case XTerm_Color_RV:
3835 process_color_seq (XTerm_Color_RV, Color_RV, str, resp); 3841 process_color_seq (op, Color_RV, str, resp);
3836 break; 3842 break;
3837 case Rxvt_Color_BD: 3843 case Rxvt_Color_BD:
3838 case URxvt_Color_BD: 3844 case URxvt_Color_BD:
3839 process_color_seq (op, Color_BD, str, resp); 3845 process_color_seq (op, Color_BD, str, resp);
3840 break; 3846 break;
3841 case Rxvt_Color_UL: 3847 case Rxvt_Color_UL:
3842 case URxvt_Color_UL: 3848 case URxvt_Color_UL:
3843 process_color_seq (op, Color_UL, str, resp); 3849 process_color_seq (op, Color_UL, str, resp);
3844 break; 3850 break;
3845 case URxvt_Color_IT: 3851 case URxvt_Color_IT:
3846 process_color_seq (URxvt_Color_IT, Color_IT, str, resp); 3852 process_color_seq (op, Color_IT, str, resp);
3847 break; 3853 break;
3848#endif 3854#endif
3849#if TRANSPARENT && TINTING 3855#if TRANSPARENT && TINTING
3850 case URxvt_Color_tint: 3856 case URxvt_Color_tint:
3851 process_color_seq (URxvt_Color_tint, Color_tint, str, resp); 3857 process_color_seq (op, Color_tint, str, resp);
3852 check_our_parents (); 3858 check_our_parents ();
3853 if (am_transparent) 3859 if (am_transparent)
3854 want_full_refresh = want_refresh = 1; 3860 want_full_refresh = want_refresh = 1;
3855 break; 3861 break;
3856#endif 3862#endif
3930 allocated.push_back ((void *)res); 3936 allocated.push_back ((void *)res);
3931 set_fonts (); 3937 set_fonts ();
3932 } 3938 }
3933 break; 3939 break;
3934 3940
3941 case URxvt_version:
3942 if (query)
3943 tt_printf ("\33]%d;rxvt-unicode;%-.20s;%c;%c%c",
3944 op,
3945 rs[Rs_name], VERSION[0], VERSION[2],
3946 resp);
3947 break;
3948
3935#if ENABLE_FRILLS 3949#if ENABLE_FRILLS
3936 case URxvt_locale: 3950 case URxvt_locale:
3937 if (query) 3951 if (query)
3938 tt_printf ("\33]%d;%-.250s%c", URxvt_locale, OPTION (Opt_insecure) ? locale : "", resp); 3952 tt_printf ("\33]%d;%-.250s%c", op, OPTION (Opt_insecure) ? locale : "", resp);
3939 else 3953 else
3940 { 3954 {
3941 set_locale (str); 3955 set_locale (str);
3942 pty->set_utf8_mode (enc_utf8); 3956 pty->set_utf8_mode (enc_utf8);
3943 init_xlocale (); 3957 init_xlocale ();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines