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.412 by ayin, Sun Feb 17 11:13:11 2008 UTC vs.
Revision 1.416 by root, Tue Jul 15 16:41:22 2008 UTC

1015 } 1015 }
1016 while (row < end_row); 1016 while (row < end_row);
1017 } 1017 }
1018 1018
1019 scr_refresh (); 1019 scr_refresh ();
1020 scrollbar_show (1); 1020 scrollBar.show (1);
1021#ifdef USE_XIM 1021#ifdef USE_XIM
1022 IMSendSpot (); 1022 IMSendSpot ();
1023#endif 1023#endif
1024 } 1024 }
1025 1025
1536 ; 1536 ;
1537 1537
1538 if (scrollBar.state && ev.xany.window == scrollBar.win) 1538 if (scrollBar.state && ev.xany.window == scrollBar.win)
1539 { 1539 {
1540 scrollBar.state = STATE_IDLE; 1540 scrollBar.state = STATE_IDLE;
1541 scrollbar_show (0); 1541 scrollBar.show (0);
1542 } 1542 }
1543 } 1543 }
1544 break; 1544 break;
1545 1545
1546 case MotionNotify: 1546 case MotionNotify:
1645 &unused_root, &unused_child, 1645 &unused_root, &unused_child,
1646 &unused_root_x, &unused_root_y, 1646 &unused_root_x, &unused_root_y,
1647 &ev.xbutton.x, &ev.xbutton.y, 1647 &ev.xbutton.x, &ev.xbutton.y,
1648 &unused_mask); 1648 &unused_mask);
1649 scr_move_to (scrollbar_position (ev.xbutton.y) - csrO, 1649 scr_move_to (scrollbar_position (ev.xbutton.y) - csrO,
1650 scrollbar_size ()); 1650 scrollBar.size ());
1651 want_refresh = 1; 1651 want_refresh = 1;
1652 scrollbar_show (1); 1652 scrollBar.show (1);
1653 } 1653 }
1654 break; 1654 break;
1655 } 1655 }
1656 1656
1657#if defined(CURSOR_BLINK) 1657#if defined(CURSOR_BLINK)
2010 } 2010 }
2011 2011
2012 if (scrollBar.style == R_SB_XTERM 2012 if (scrollBar.style == R_SB_XTERM
2013 || scrollbar_above_slider (ev.y) 2013 || scrollbar_above_slider (ev.y)
2014 || scrollbar_below_slider (ev.y)) 2014 || scrollbar_below_slider (ev.y))
2015 scr_move_to (scrollbar_position (ev.y) - csrO, scrollbar_size ()); 2015 scr_move_to (scrollbar_position (ev.y) - csrO, scrollBar.size ());
2016 2016
2017 scrollBar.state = STATE_MOTION; 2017 scrollBar.state = STATE_MOTION;
2018 break; 2018 break;
2019 2019
2020 case Button1: 2020 case Button1:
2043 else 2043 else
2044 { 2044 {
2045 scr_page ((ev.button == Button1 ? DN : UP), 2045 scr_page ((ev.button == Button1 ? DN : UP),
2046 (nrow 2046 (nrow
2047 * scrollbar_position (ev.y) 2047 * scrollbar_position (ev.y)
2048 / scrollbar_size ())); 2048 / scrollBar.size ()));
2049 } 2049 }
2050 2050
2051 break; 2051 break;
2052 } 2052 }
2053 } 2053 }
2066 reportmode = !! (priv_modes & PrivMode_mouse_report); 2066 reportmode = !! (priv_modes & PrivMode_mouse_report);
2067 2067
2068 if (scrollBar.state == STATE_UP || scrollBar.state == STATE_DOWN) 2068 if (scrollBar.state == STATE_UP || scrollBar.state == STATE_DOWN)
2069 { 2069 {
2070 scrollBar.state = STATE_IDLE; 2070 scrollBar.state = STATE_IDLE;
2071 scrollbar_show (0); 2071 scrollBar.show (0);
2072 } 2072 }
2073 2073
2074#ifdef SELECTION_SCROLLING 2074#ifdef SELECTION_SCROLLING
2075 sel_scroll_ev.stop(); 2075 sel_scroll_ev.stop();
2076#endif 2076#endif
2159 } 2159 }
2160 else 2160 else
2161# endif 2161# endif
2162 { 2162 {
2163 scr_page (v, i); 2163 scr_page (v, i);
2164 scrollbar_show (1); 2164 scrollBar.show (1);
2165 } 2165 }
2166 } 2166 }
2167 break; 2167 break;
2168#endif 2168#endif
2169 } 2169 }
2324 cmdbuf_ptr = cmdbuf_endp; 2324 cmdbuf_ptr = cmdbuf_endp;
2325 break; 2325 break;
2326 } 2326 }
2327 2327
2328 if (len == (size_t)-1) 2328 if (len == (size_t)-1)
2329 {
2330 mbrtowc (0, 0, 0, mbstate); // reset now undefined conversion state
2329 return (unsigned char)*cmdbuf_ptr++; // the _occasional_ latin1 character is allowed to slip through 2331 return (unsigned char)*cmdbuf_ptr++; // the _occasional_ latin1 character is allowed to slip through
2332 }
2330 2333
2331 // assume wchar == unicode 2334 // assume wchar == unicode
2332 cmdbuf_ptr += len; 2335 cmdbuf_ptr += len;
2333 return wc & UNICODE_MASK; 2336 return wc & UNICODE_MASK;
2334 } 2337 }
2378/*----------------------------------------------------------------------*/ 2381/*----------------------------------------------------------------------*/
2379#ifdef PRINTPIPE 2382#ifdef PRINTPIPE
2380FILE * 2383FILE *
2381rxvt_term::popen_printer () 2384rxvt_term::popen_printer ()
2382{ 2385{
2383 FILE *stream = popen (rs[Rs_print_pipe], "w"); 2386 FILE *stream = popen (rs[Rs_print_pipe] ? rs[Rs_print_pipe] : PRINTPIPE, "w");
2384 2387
2385 if (stream == NULL) 2388 if (stream == NULL)
2386 rxvt_warn ("can't open printer pipe, not printing.\n"); 2389 rxvt_warn ("can't open printer pipe, not printing.\n");
2387 2390
2388 return stream; 2391 return stream;
2399 * simulate attached vt100 printer 2402 * simulate attached vt100 printer
2400 */ 2403 */
2401void 2404void
2402rxvt_term::process_print_pipe () 2405rxvt_term::process_print_pipe ()
2403{ 2406{
2404 int done; 2407 FILE *fd = popen_printer ();
2405 FILE *fd;
2406 2408
2407 if ((fd = popen_printer ()) == NULL) 2409 if (!fd)
2408 return; 2410 return;
2409 2411
2410 /* 2412 /*
2411 * Send all input to the printer until either ESC[4i or ESC[?4i 2413 * Send all input to the printer until either ESC[4i or ESC[?4i
2412 * is received. 2414 * is received.
2413 */ 2415 */
2414 for (done = 0; !done;) 2416 for (int done = 0; !done; )
2415 { 2417 {
2416 unsigned char buf[8]; 2418 unsigned char buf[8];
2417 unicode_t ch; 2419 unicode_t ch;
2418 unsigned int i, len; 2420 unsigned int i, len;
2419 2421
2691 2693
2692 /* 8.3.106: RESET TO INITIAL STATE */ 2694 /* 8.3.106: RESET TO INITIAL STATE */
2693 case 'c': 2695 case 'c':
2694 mbstate.reset (); 2696 mbstate.reset ();
2695 scr_poweron (); 2697 scr_poweron ();
2696 scrollbar_show (1); 2698 scrollBar.show (1);
2697 break; 2699 break;
2698 2700
2699 /* 8.3.79: LOCKING-SHIFT TWO (see ISO2022) */ 2701 /* 8.3.79: LOCKING-SHIFT TWO (see ISO2022) */
2700 case 'n': 2702 case 'n':
2701 scr_charset_choose (2); 2703 scr_charset_choose (2);
3677 if (state) /* orthogonal */ 3679 if (state) /* orthogonal */
3678 priv_modes &= ~(PrivMode_MouseX11|PrivMode_MouseBtnEvent|PrivMode_MouseAnyEvent); 3680 priv_modes &= ~(PrivMode_MouseX11|PrivMode_MouseBtnEvent|PrivMode_MouseAnyEvent);
3679 break; 3681 break;
3680#ifdef scrollBar_esc 3682#ifdef scrollBar_esc
3681 case scrollBar_esc: 3683 case scrollBar_esc:
3682 if (scrollbar_mapping (state)) 3684 if (scrollBar.map (state))
3683 { 3685 {
3684 resize_all_windows (0, 0, 0); 3686 resize_all_windows (0, 0, 0);
3685 scr_touch (true); 3687 scr_touch (true);
3686 } 3688 }
3687 break; 3689 break;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines