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.399 by ayin, Mon Jan 28 10:54:54 2008 UTC vs.
Revision 1.400 by ayin, Mon Jan 28 12:54:47 2008 UTC

1947 /* 1947 /*
1948 * Scrollbar window processing of button press 1948 * Scrollbar window processing of button press
1949 */ 1949 */
1950 if (scrollBar.state && ev.window == scrollBar.win) 1950 if (scrollBar.state && ev.window == scrollBar.win)
1951 { 1951 {
1952 int upordown = 0;
1953
1954 if (scrollBar.upButton (ev.y))
1955 upordown = -1; /* up */
1956 else if (scrollBar.dnButton (ev.y))
1957 upordown = 1; /* down */
1958
1952 scrollBar.setIdle (); 1959 scrollBar.setIdle ();
1953 /* 1960 /*
1954 * Rxvt-style scrollbar: 1961 * Rxvt-style scrollbar:
1955 * move up if mouse is above slider 1962 * move up if mouse is above slider
1956 * move dn if mouse is below slider 1963 * move dn if mouse is below slider
1966 /* 1973 /*
1967 * Mouse report disabled scrollbar: 1974 * Mouse report disabled scrollbar:
1968 * arrow buttons - send up/down 1975 * arrow buttons - send up/down
1969 * click on scrollbar - send pageup/down 1976 * click on scrollbar - send pageup/down
1970 */ 1977 */
1971 if (scrollBar.upButton (ev.y)) 1978 if (upordown < 0)
1972 tt_printf ("\033[A"); 1979 tt_printf ("\033[A");
1973 else if (scrollBar.dnButton (ev.y)) 1980 else if (upordown > 0)
1974 tt_printf ("\033[B"); 1981 tt_printf ("\033[B");
1975 else 1982 else
1976 switch (ev.button) 1983 switch (ev.button)
1977 { 1984 {
1978 case Button2: 1985 case Button2:
1988 } 1995 }
1989 else 1996 else
1990#endif /* NO_SCROLLBAR_REPORT */ 1997#endif /* NO_SCROLLBAR_REPORT */
1991 1998
1992 { 1999 {
1993 char upordown = 0;
1994
1995 if (scrollBar.upButton (ev.y))
1996 upordown = -1; /* up */
1997 else if (scrollBar.dnButton (ev.y))
1998 upordown = 1; /* down */
1999
2000 if (upordown) 2000 if (upordown)
2001 { 2001 {
2002#ifndef NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING 2002#ifndef NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING
2003 if (!cont_scroll_ev.is_active ()) 2003 if (!cont_scroll_ev.is_active ())
2004 cont_scroll_ev.start (SCROLLBAR_INITIAL_DELAY, SCROLLBAR_CONTINUOUS_DELAY); 2004 cont_scroll_ev.start (SCROLLBAR_INITIAL_DELAY, SCROLLBAR_CONTINUOUS_DELAY);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines