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.493 by sf-exg, Sun Aug 21 20:17:40 2011 UTC vs.
Revision 1.496 by sf-exg, Wed Aug 31 22:39:49 2011 UTC

1666 XQueryPointer (dpy, scrollBar.win, 1666 XQueryPointer (dpy, scrollBar.win,
1667 &unused_root, &unused_child, 1667 &unused_root, &unused_child,
1668 &unused_root_x, &unused_root_y, 1668 &unused_root_x, &unused_root_y,
1669 &ev.xbutton.x, &ev.xbutton.y, 1669 &ev.xbutton.x, &ev.xbutton.y,
1670 &unused_mask); 1670 &unused_mask);
1671 scr_move_to (scrollbar_position (ev.xbutton.y) - csrO, 1671 scr_move_to (scrollBar.position (ev.xbutton.y) - csrO,
1672 scrollBar.size ()); 1672 scrollBar.size ());
1673 want_refresh = 1; 1673 want_refresh = 1;
1674 scrollBar.show (1); 1674 scrollBar.show (1);
1675 } 1675 }
1676 break; 1676 break;
2044 csrO = scrollBar.bot - scrollBar.top; 2044 csrO = scrollBar.bot - scrollBar.top;
2045 break; 2045 break;
2046 } 2046 }
2047 2047
2048 if (scrollBar.style == R_SB_XTERM 2048 if (scrollBar.style == R_SB_XTERM
2049 || scrollbar_above_slider (ev.y) 2049 || scrollBar.above_slider (ev.y)
2050 || scrollbar_below_slider (ev.y)) 2050 || scrollBar.below_slider (ev.y))
2051 scr_move_to (scrollbar_position (ev.y) - csrO, scrollBar.size ()); 2051 scr_move_to (scrollBar.position (ev.y) - csrO, scrollBar.size ());
2052 2052
2053 scrollBar.state = STATE_MOTION; 2053 scrollBar.state = STATE_MOTION;
2054 break; 2054 break;
2055 2055
2056 case Button1: 2056 case Button1:
2059 /* FALLTHROUGH */ 2059 /* FALLTHROUGH */
2060 2060
2061 case Button3: 2061 case Button3:
2062 if (scrollBar.style != R_SB_XTERM) 2062 if (scrollBar.style != R_SB_XTERM)
2063 { 2063 {
2064 if (scrollbar_above_slider (ev.y)) 2064 if (scrollBar.above_slider (ev.y))
2065# ifdef RXVT_SCROLL_FULL 2065# ifdef RXVT_SCROLL_FULL
2066 scr_page (UP, nrow - 1); 2066 scr_page (UP, nrow - 1);
2067# else 2067# else
2068 scr_page (UP, nrow / 4); 2068 scr_page (UP, nrow / 4);
2069# endif 2069# endif
2070 else if (scrollbar_below_slider (ev.y)) 2070 else if (scrollBar.below_slider (ev.y))
2071# ifdef RXVT_SCROLL_FULL 2071# ifdef RXVT_SCROLL_FULL
2072 scr_page (DN, nrow - 1); 2072 scr_page (DN, nrow - 1);
2073# else 2073# else
2074 scr_page (DN, nrow / 4); 2074 scr_page (DN, nrow / 4);
2075# endif 2075# endif
2078 } 2078 }
2079 else 2079 else
2080 { 2080 {
2081 scr_page ((ev.button == Button1 ? DN : UP), 2081 scr_page ((ev.button == Button1 ? DN : UP),
2082 (nrow 2082 (nrow
2083 * scrollbar_position (ev.y) 2083 * scrollBar.position (ev.y)
2084 / scrollBar.size ())); 2084 / scrollBar.size ()));
2085 } 2085 }
2086 2086
2087 break; 2087 break;
2088 } 2088 }
2590 break; 2590 break;
2591 case 'Z': /* identify the terminal type */ 2591 case 'Z': /* identify the terminal type */
2592 tt_printf ("\033/Z"); /* I am a VT100 emulating a VT52 */ 2592 tt_printf ("\033/Z"); /* I am a VT100 emulating a VT52 */
2593 break; 2593 break;
2594 case '<': /* turn off VT52 mode */ 2594 case '<': /* turn off VT52 mode */
2595 set_privmode (PrivMode_vt52, 0); 2595 priv_modes &= ~PrivMode_vt52;
2596 break; 2596 break;
2597 case 'F': /* use special graphics character set */ 2597 case 'F': /* use special graphics character set */
2598 case 'G': /* use regular character set */ 2598 case 'G': /* use regular character set */
2599 /* unimplemented */ 2599 /* unimplemented */
2600 break; 2600 break;
2653 scr_forwardindex (); 2653 scr_forwardindex ();
2654 break; 2654 break;
2655#endif 2655#endif
2656 // DECPAM/DECPNM 2656 // DECPAM/DECPNM
2657 case '=': 2657 case '=':
2658 priv_modes |= PrivMode_aplKP;
2659 break;
2658 case '>': 2660 case '>':
2659 set_privmode (PrivMode_aplKP, ch == '='); 2661 priv_modes &= ~PrivMode_aplKP;
2660 break; 2662 break;
2661 2663
2662 case C1_40: 2664 case C1_40:
2663 cmd_getc (); 2665 cmd_getc ();
2664 break; 2666 break;
3585 if (mode == 'r') 3587 if (mode == 'r')
3586 state = (SavedModes & bit) ? 1 : 0; /* no overlapping */ 3588 state = (SavedModes & bit) ? 1 : 0; /* no overlapping */
3587 else 3589 else
3588 state = (mode == 't') ? ! (priv_modes & bit) : mode; 3590 state = (mode == 't') ? ! (priv_modes & bit) : mode;
3589 3591
3590 set_privmode (bit, state); 3592 if (state)
3593 priv_modes |= bit;
3594 else
3595 priv_modes &= ~bit;
3591 } 3596 }
3592 3597
3593 return state; 3598 return state;
3594} 3599}
3595 3600
3700 case 2: /* VT52 mode */ 3705 case 2: /* VT52 mode */
3701 /* oddball mode. should be set regardless of set/reset 3706 /* oddball mode. should be set regardless of set/reset
3702 * parameter. Return from VT52 mode with an ESC < from 3707 * parameter. Return from VT52 mode with an ESC < from
3703 * within VT52 mode 3708 * within VT52 mode
3704 */ 3709 */
3705 set_privmode (PrivMode_vt52, 1); 3710 priv_modes |= PrivMode_vt52;
3706 break; 3711 break;
3707 case 3: /* 80/132 */ 3712 case 3: /* 80/132 */
3708 if (priv_modes & PrivMode_132OK) 3713 if (priv_modes & PrivMode_132OK)
3709 set_widthheight ((state ? 132 : 80) * fwidth, 24 * fheight); 3714 set_widthheight ((state ? 132 : 80) * fwidth, 24 * fheight);
3710 break; 3715 break;
3725 if (state) /* orthogonal */ 3730 if (state) /* orthogonal */
3726 priv_modes &= ~(PrivMode_MouseX11|PrivMode_MouseBtnEvent|PrivMode_MouseAnyEvent); 3731 priv_modes &= ~(PrivMode_MouseX11|PrivMode_MouseBtnEvent|PrivMode_MouseAnyEvent);
3727 break; 3732 break;
3728#ifdef scrollBar_esc 3733#ifdef scrollBar_esc
3729 case scrollBar_esc: 3734 case scrollBar_esc:
3730 if (scrollBar.map (state)) 3735 scrollBar.map (state);
3731 {
3732 resize_all_windows (0, 0, 0); 3736 resize_all_windows (0, 0, 0);
3733 scr_touch (true); 3737 scr_touch (true);
3734 }
3735 break; 3738 break;
3736#endif 3739#endif
3737 case 25: /* visible/invisible cursor */ 3740 case 25: /* visible/invisible cursor */
3738 scr_cursor_visible (state); 3741 scr_cursor_visible (state);
3739 break; 3742 break;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines