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.528 by sf-exg, Sat Dec 29 15:59:51 2012 UTC vs.
Revision 1.534 by sf-exg, Tue Mar 26 14:16:46 2013 UTC

1472 bool moved = false; 1472 bool moved = false;
1473#ifdef HAVE_BG_PIXMAP 1473#ifdef HAVE_BG_PIXMAP
1474 if (bg_window_position_sensitive ()) 1474 if (bg_window_position_sensitive ())
1475 { 1475 {
1476 want_position_change = true; 1476 want_position_change = true;
1477 if (!(bg_flags & BG_IS_VALID)) 1477 if (bg_img == 0)
1478 moved = true; 1478 moved = true;
1479 } 1479 }
1480#endif 1480#endif
1481 1481
1482 if (want_position_change) 1482 if (want_position_change)
1529 selection_send (ev.xselectionrequest); 1529 selection_send (ev.xselectionrequest);
1530 break; 1530 break;
1531 1531
1532 case MapNotify: 1532 case MapNotify:
1533#ifdef HAVE_BG_PIXMAP 1533#ifdef HAVE_BG_PIXMAP
1534 /* This is needed specifically to fix the case of no window manager or a 1534 // This is needed at startup for the case of no window manager
1535 * non-reparenting window manager. In those cases we never get first 1535 // or a non-reparenting window manager and also because we
1536 * ConfigureNotify. Also that speeds startup under normal WM, by taking 1536 // defer bg image updates if the window is not mapped. The
1537 * care of multiplicity of ConfigureNotify events arriving while WM does 1537 // short delay is to optimize for multiple ConfigureNotify
1538 * reparenting. 1538 // events at startup when the window manager reparents the
1539 * We should not render background immediately, as there could be several 1539 // window, so as to perform the computation after we have
1540 * ConfigureNotify's to follow. Lets take care of all of them in one scoop 1540 // received all of them.
1541 * by scheduling background redraw as soon as we can, but giving a short 1541 if (bg_img == 0)
1542 * bit of time for ConfigureNotifies to arrive.
1543 * We should render background PRIOR to drawing any text, but AFTER all
1544 * of ConfigureNotifys for the best results.
1545 */
1546 if (!(bg_flags & BG_IS_VALID))
1547 update_background_ev.start (0.025); 1542 update_background_ev.start (0.025);
1548#endif 1543#endif
1549 mapped = 1; 1544 mapped = 1;
1550#ifdef TEXT_BLINK 1545#ifdef TEXT_BLINK
1551 text_blink_ev.start (); 1546 text_blink_ev.start ();
1859 */ 1854 */
1860 if (ev.xproperty.atom == xa[XA_XROOTPMAP_ID] 1855 if (ev.xproperty.atom == xa[XA_XROOTPMAP_ID]
1861 || ev.xproperty.atom == xa[XA_ESETROOT_PMAP_ID]) 1856 || ev.xproperty.atom == xa[XA_ESETROOT_PMAP_ID])
1862 { 1857 {
1863#if BG_IMAGE_FROM_ROOT 1858#if BG_IMAGE_FROM_ROOT
1864 bg_set_root_pixmap (); 1859 if (option (Opt_transparent))
1860 {
1861 rxvt_img::new_from_root (this)->replace (root_img);
1865 update_background (); 1862 update_background ();
1863 }
1866#endif 1864#endif
1867#if ENABLE_PERL
1868 HOOK_INVOKE ((this, HOOK_ROOTPMAP_CHANGE, DT_END)); 1865 HOOK_INVOKE ((this, HOOK_ROOTPMAP_CHANGE, DT_END));
1869#endif
1870 } 1866 }
1871 1867
1872 break; 1868 break;
1873 } 1869 }
1874 1870
2803 }; 2799 };
2804 2800
2805void ecb_hot 2801void ecb_hot
2806rxvt_term::process_csi_seq () 2802rxvt_term::process_csi_seq ()
2807{ 2803{
2808 unicode_t ch, priv, i; 2804 unicode_t ch, priv, prev_ch, i;
2809 unsigned int nargs, p; 2805 unsigned int nargs, p;
2810 int n, ndef; 2806 int n, ndef;
2811 int arg[ESC_ARGS] = { }; 2807 int arg[ESC_ARGS] = { };
2812 2808
2813 nargs = 0; 2809 nargs = 0;
2819 /* '<' '=' '>' '?' '!' */ 2815 /* '<' '=' '>' '?' '!' */
2820 priv = ch; 2816 priv = ch;
2821 ch = cmd_getc (); 2817 ch = cmd_getc ();
2822 } 2818 }
2823 2819
2820 prev_ch = 0;
2824 /* read any numerical arguments */ 2821 /* read any numerical arguments */
2825 for (n = -1; ch < CSI_ICH; ) 2822 for (n = -1; ch < CSI_ICH; )
2826 { 2823 {
2827 if (isdigit (ch)) 2824 if (isdigit (ch))
2828 { 2825 {
2838 n = -1; 2835 n = -1;
2839 } 2836 }
2840 else if (IS_CONTROL (ch)) 2837 else if (IS_CONTROL (ch))
2841 process_nonprinting (ch); 2838 process_nonprinting (ch);
2842 2839
2840 prev_ch = ch;
2843 ch = cmd_getc (); 2841 ch = cmd_getc ();
2844 } 2842 }
2845 2843
2846 if (ch > CSI_7F) 2844 if (ch > CSI_7F)
2847 return; 2845 return;
3079 case CSI_SM: /* 8.3.126: SET MODE */ 3077 case CSI_SM: /* 8.3.126: SET MODE */
3080 if (arg[0] == 4) 3078 if (arg[0] == 4)
3081 scr_insert_mode (1); 3079 scr_insert_mode (1);
3082 else if (arg[0] == 20) 3080 else if (arg[0] == 20)
3083 priv_modes |= PrivMode_LFNL; 3081 priv_modes |= PrivMode_LFNL;
3082 break;
3083
3084 case CSI_71: // DESCUSR: set cursor style
3085 if (prev_ch == ' ')
3086 set_cursor_style (arg[0]);
3084 break; 3087 break;
3085 3088
3086 /* 3089 /*
3087 * PRIVATE USE beyond this point. All CSI_7? sequences here 3090 * PRIVATE USE beyond this point. All CSI_7? sequences here
3088 */ 3091 */
3995 break; 3998 break;
3996#endif 3999#endif
3997 } 4000 }
3998 } 4001 }
3999} 4002}
4003
4004void
4005rxvt_term::set_cursor_style (int style)
4006{
4007 if (!IN_RANGE_INC (style, 0, 4))
4008 return;
4009
4010 set_option (Opt_cursorUnderline, style >= 3);
4011
4012#ifdef CURSOR_BLINK
4013 set_option (Opt_cursorBlink, !style || (style & 1));
4014 cursor_blink_reset ();
4015#endif
4016
4017 want_refresh = 1;
4018}
4000/*}}} */ 4019/*}}} */
4001 4020
4002/* ------------------------------------------------------------------------- */ 4021/* ------------------------------------------------------------------------- */
4003 4022
4004/* 4023/*

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines