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.553 by sf-exg, Sat Jul 26 15:58:38 2014 UTC vs.
Revision 1.563 by root, Sat Dec 13 12:24:32 2014 UTC

210 210
211 max_it (width, strlen (attr)); 211 max_it (width, strlen (attr));
212 212
213 if (y >= 0) 213 if (y >= 0)
214 { 214 {
215 y = (y >= nrow - len - 4 && x < width + 2) ? 0 : -1; 215 y = (y >= nrow - len - 5 && x < width + 2) ? 0 : -1;
216 x = 0; 216 x = 0;
217 } 217 }
218 218
219 scr_overlay_new (x, y, width, len * 2 + 2); 219 scr_overlay_new (x, y, width, len * 2 + 2);
220 220
676 { 676 {
677 char *ch; 677 char *ch;
678 678
679 for (ch = kbuf; ch < kbuf + len; ch++) 679 for (ch = kbuf; ch < kbuf + len; ch++)
680 *ch |= 0x80; 680 *ch |= 0x80;
681
682 meta = 0;
683 } 681 }
684#endif 682#endif
685 /* nil */ ; 683 /* nil */ ;
686 } 684 }
687 685
1042 { 1040 {
1043 hidden_cursor = 0; 1041 hidden_cursor = 0;
1044 want_refresh = 1; 1042 want_refresh = 1;
1045 } 1043 }
1046 1044
1047 if (option (Opt_cursorBlink)) 1045 if (option (Opt_cursorBlink) || (priv_modes & PrivMode_BlinkingCursor))
1048 cursor_blink_ev.again (); 1046 cursor_blink_ev.again ();
1049 else 1047 else
1050 cursor_blink_ev.stop (); 1048 cursor_blink_ev.stop ();
1051} 1049}
1052 1050
1241 1239
1242void ecb_cold 1240void ecb_cold
1243rxvt_term::pointer_unblank () 1241rxvt_term::pointer_unblank ()
1244{ 1242{
1245 XDefineCursor (dpy, vt, TermWin_cursor); 1243 XDefineCursor (dpy, vt, TermWin_cursor);
1246 recolour_cursor (); 1244 recolor_cursor ();
1247 1245
1248#ifdef POINTER_BLANK 1246#ifdef POINTER_BLANK
1249 hidden_pointer = 0; 1247 hidden_pointer = 0;
1250 1248
1251 if (option (Opt_pointerBlank)) 1249 if (option (Opt_pointerBlank))
1781#endif 1779#endif
1782#if OFF_FOCUS_FADING 1780#if OFF_FOCUS_FADING
1783 if (rs[Rs_fade]) 1781 if (rs[Rs_fade])
1784 { 1782 {
1785 pix_colors = pix_colors_focused; 1783 pix_colors = pix_colors_focused;
1786 scr_recolour (); 1784 scr_recolor ();
1787 } 1785 }
1788#endif 1786#endif
1789#if ENABLE_FRILLS 1787#if ENABLE_FRILLS
1790 if (option (Opt_urgentOnBell)) 1788 if (option (Opt_urgentOnBell))
1791 set_urgency (0); 1789 set_urgency (0);
1828#endif 1826#endif
1829#if OFF_FOCUS_FADING 1827#if OFF_FOCUS_FADING
1830 if (rs[Rs_fade]) 1828 if (rs[Rs_fade])
1831 { 1829 {
1832 pix_colors = pix_colors_unfocused; 1830 pix_colors = pix_colors_unfocused;
1833 scr_recolour (); 1831 scr_recolor ();
1834 } 1832 }
1835#endif 1833#endif
1836 1834
1837 HOOK_INVOKE ((this, HOOK_FOCUS_OUT, DT_END)); 1835 HOOK_INVOKE ((this, HOOK_FOCUS_OUT, DT_END));
1838 } 1836 }
1839} 1837}
1840 1838
1841void ecb_cold 1839void ecb_cold
1842rxvt_term::update_fade_color (unsigned int idx) 1840rxvt_term::update_fade_color (unsigned int idx, bool first_time)
1843{ 1841{
1844#if OFF_FOCUS_FADING 1842#if OFF_FOCUS_FADING
1845 if (rs[Rs_fade]) 1843 if (rs[Rs_fade])
1846 { 1844 {
1845 if (!first_time)
1846 pix_colors_focused [idx].free (this);
1847
1847 rgba c; 1848 rgba c;
1848 pix_colors [Color_fade].get (c); 1849 pix_colors [Color_fade].get (c);
1849 pix_colors_focused [idx].fade (this, atoi (rs[Rs_fade]), pix_colors_unfocused [idx], c); 1850 pix_colors_focused [idx].fade (this, atoi (rs[Rs_fade]), pix_colors_unfocused [idx], c);
1850 } 1851 }
1851#endif 1852#endif
1913 iso14755_54 (ev.x, ev.y); 1914 iso14755_54 (ev.x, ev.y);
1914 return; 1915 return;
1915 } 1916 }
1916#endif 1917#endif
1917 1918
1918 clickintime = ev.time - MEvent.time < MULTICLICK_TIME; 1919 clickintime = ev.time - MEvent.time < multiClickTime;
1919 1920
1920 if (reportmode) 1921 if (reportmode)
1921 { 1922 {
1922 /* mouse report from vt window */ 1923 /* mouse report from vt window */
1923 /* save the xbutton state (for ButtonRelease) */ 1924 /* save the xbutton state (for ButtonRelease) */
2173#ifdef MOUSE_REPORT_DOUBLECLICK 2174#ifdef MOUSE_REPORT_DOUBLECLICK
2174 /* only report the release of 'slow' single clicks */ 2175 /* only report the release of 'slow' single clicks */
2175 if (MEvent.button != AnyButton 2176 if (MEvent.button != AnyButton
2176 && (ev.button != MEvent.button 2177 && (ev.button != MEvent.button
2177 || (ev.time - MEvent.time 2178 || (ev.time - MEvent.time
2178 > MULTICLICK_TIME / 2))) 2179 > multiClickTime / 2)))
2179 { 2180 {
2180 MEvent.clicks = 0; 2181 MEvent.clicks = 0;
2181 MEvent.button = AnyButton; 2182 MEvent.button = AnyButton;
2182 mouse_report (ev); 2183 mouse_report (ev);
2183 } 2184 }
2573 scr_charset_choose (0); 2574 scr_charset_choose (0);
2574 break; 2575 break;
2575 2576
2576#ifdef EIGHT_BIT_CONTROLS 2577#ifdef EIGHT_BIT_CONTROLS
2577 // 8-bit controls 2578 // 8-bit controls
2578 case 0x90: /* DCS */ 2579 case 0x90: /* DCS */
2579 process_dcs_seq (); 2580 process_dcs_seq ();
2580 break; 2581 break;
2581 case 0x9b: /* CSI */ 2582 case 0x9b: /* CSI */
2582 process_csi_seq (); 2583 process_csi_seq ();
2583 break; 2584 break;
2584 case 0x9d: /* OSC */ 2585 case 0x9d: /* OSC */
2585 process_osc_seq (); 2586 process_osc_seq ();
2586 break; 2587 break;
2587#endif 2588#endif
2588 } 2589 }
2589} 2590}
3094 scr_insert_mode (1); 3095 scr_insert_mode (1);
3095 else if (arg[0] == 20) 3096 else if (arg[0] == 20)
3096 priv_modes |= PrivMode_LFNL; 3097 priv_modes |= PrivMode_LFNL;
3097 break; 3098 break;
3098 3099
3099 case CSI_71: // DESCUSR: set cursor style 3100 case CSI_71: // DECSCUSR: set cursor style
3100 if (prev_ch == ' ') 3101 if (prev_ch == ' ')
3101 set_cursor_style (arg[0]); 3102 set_cursor_style (arg[0]);
3102 break; 3103 break;
3103 3104
3104 /* 3105 /*
3682 { 5, PrivMode_rVideo }, // DECSCNM 3683 { 5, PrivMode_rVideo }, // DECSCNM
3683 { 6, PrivMode_relOrigin }, // DECOM 3684 { 6, PrivMode_relOrigin }, // DECOM
3684 { 7, PrivMode_Autowrap }, // DECAWM 3685 { 7, PrivMode_Autowrap }, // DECAWM
3685 // 8, auto-repeat keys // DECARM 3686 // 8, auto-repeat keys // DECARM
3686 { 9, PrivMode_MouseX10 }, 3687 { 9, PrivMode_MouseX10 },
3688 { 12, PrivMode_BlinkingCursor },
3687 // 18 end FF to printer after print screen 3689 // 18 end FF to printer after print screen
3688 // 19 Print screen prints full screen/scroll region 3690 // 19 Print screen prints full screen/scroll region
3689 { 25, PrivMode_VisibleCursor }, // DECTCEM cnorm/cvvis/civis 3691 { 25, PrivMode_VisibleCursor }, // DECTCEM cnorm/cvvis/civis
3690#ifdef scrollBar_esc 3692#ifdef scrollBar_esc
3691 { scrollBar_esc, PrivMode_scrollBar }, 3693 { scrollBar_esc, PrivMode_scrollBar },
3800 scrollBar.map (state); 3802 scrollBar.map (state);
3801 resize_all_windows (0, 0, 0); 3803 resize_all_windows (0, 0, 0);
3802 scr_touch (true); 3804 scr_touch (true);
3803 break; 3805 break;
3804#endif 3806#endif
3807#ifdef CURSOR_BLINK
3808 case 12:
3809 cursor_blink_reset ();
3810 break;
3811#endif
3805 case 25: /* visible/invisible cursor */ 3812 case 25: /* visible/invisible cursor */
3806 scr_cursor_visible (state); 3813 scr_cursor_visible (state);
3807 break; 3814 break;
3808 /* case 35: - shift keys */ 3815 /* case 35: - shift keys */
3809 /* case 40: - 80 <--> 132 mode */ 3816 /* case 40: - 80 <--> 132 mode */
3914 //case 19: // ninth alt font 3921 //case 19: // ninth alt font
3915 //case 20: // gothic 3922 //case 20: // gothic
3916 case 21: // disable bold, faint, sometimes doubly underlined (iso 8613) 3923 case 21: // disable bold, faint, sometimes doubly underlined (iso 8613)
3917 rendset = 0, rendstyle = RS_Bold; 3924 rendset = 0, rendstyle = RS_Bold;
3918 break; 3925 break;
3919 case 22: // normal intensity 3926 case 22: // bold off (vt220)
3920 rendset = 0, rendstyle = RS_Bold; 3927 rendset = 0, rendstyle = RS_Bold;
3921 break; 3928 break;
3922 case 23: // disable italic 3929 case 23: // disable italic
3923 rendset = 0, rendstyle = RS_Italic; 3930 rendset = 0, rendstyle = RS_Italic;
3924 break; 3931 break;
3925 case 24: 3932 case 24: // underline off (vt220)
3926 rendset = 0, rendstyle = RS_Uline; 3933 rendset = 0, rendstyle = RS_Uline;
3927 break; 3934 break;
3928 case 25: 3935 case 25: // blink off (vt220)
3929 rendset = 0, rendstyle = RS_Blink; 3936 rendset = 0, rendstyle = RS_Blink;
3930 break; 3937 break;
3931 case 26: // variable spacing (iso 8613) 3938 case 26: // variable spacing (iso 8613)
3932 rendset = 0, rendstyle = RS_Blink; 3939 rendset = 0, rendstyle = RS_Blink;
3933 break; 3940 break;
3934 case 27: 3941 case 27: // reverse off (vt220)
3935 rendset = 0, rendstyle = RS_RVid; 3942 rendset = 0, rendstyle = RS_RVid;
3936 break; 3943 break;
3937 //case 28: // visible. NYI 3944 //case 28: // visible. NYI
3938 //case 29: // not crossed-out 3945 //case 29: // not crossed-out
3939 } 3946 }
4017} 4024}
4018 4025
4019void 4026void
4020rxvt_term::set_cursor_style (int style) 4027rxvt_term::set_cursor_style (int style)
4021{ 4028{
4022 if (!IN_RANGE_INC (style, 0, 4)) 4029 if (!IN_RANGE_INC (style, 0, 6))
4023 return; 4030 return;
4024 4031
4032 if (style == 0)
4033 style = 1;
4034
4035 cursor_type = (style - 1) / 2;
4025 set_option (Opt_cursorUnderline, style >= 3); 4036 set_option (Opt_cursorUnderline, cursor_type == 1);
4026 4037
4027#ifdef CURSOR_BLINK 4038#ifdef CURSOR_BLINK
4028 set_option (Opt_cursorBlink, !style || (style & 1)); 4039 set_option (Opt_cursorBlink, style & 1);
4029 cursor_blink_reset (); 4040 cursor_blink_reset ();
4030#endif 4041#endif
4031 4042
4032 want_refresh = 1; 4043 want_refresh = 1;
4033} 4044}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines