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.402 by ayin, Fri Feb 1 14:13:52 2008 UTC vs.
Revision 1.404 by root, Sat Feb 2 15:19:55 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; 1952 page_dirn direction = NO_DIR;
1953 1953
1954 if (scrollBar.upButton (ev.y)) 1954 if (scrollBar.upButton (ev.y))
1955 upordown = -1; /* up */ 1955 direction = UP; /* up */
1956 else if (scrollBar.dnButton (ev.y)) 1956 else if (scrollBar.dnButton (ev.y))
1957 upordown = 1; /* down */ 1957 direction = DN; /* down */
1958 1958
1959 scrollBar.state = STATE_IDLE; 1959 scrollBar.state = STATE_IDLE;
1960 /* 1960 /*
1961 * Rxvt-style scrollbar: 1961 * Rxvt-style scrollbar:
1962 * move up if mouse is above slider 1962 * move up if mouse is above slider
1973 /* 1973 /*
1974 * Mouse report disabled scrollbar: 1974 * Mouse report disabled scrollbar:
1975 * arrow buttons - send up/down 1975 * arrow buttons - send up/down
1976 * click on scrollbar - send pageup/down 1976 * click on scrollbar - send pageup/down
1977 */ 1977 */
1978 if (upordown < 0) 1978 if (direction == UP)
1979 tt_printf ("\033[A"); 1979 tt_printf ("\033[A");
1980 else if (upordown > 0) 1980 else if (direction == DN)
1981 tt_printf ("\033[B"); 1981 tt_printf ("\033[B");
1982 else 1982 else
1983 switch (ev.button) 1983 switch (ev.button)
1984 { 1984 {
1985 case Button2: 1985 case Button2:
1993 break; 1993 break;
1994 } 1994 }
1995 } 1995 }
1996 else 1996 else
1997#endif /* NO_SCROLLBAR_REPORT */ 1997#endif /* NO_SCROLLBAR_REPORT */
1998
1999 { 1998 {
2000 if (upordown) 1999 if (direction != NO_DIR)
2001 { 2000 {
2002#ifndef NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING 2001#ifndef NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING
2003 if (!cont_scroll_ev.is_active ()) 2002 if (!cont_scroll_ev.is_active ())
2004 cont_scroll_ev.start (SCROLLBAR_INITIAL_DELAY, SCROLLBAR_CONTINUOUS_DELAY); 2003 cont_scroll_ev.start (SCROLLBAR_INITIAL_DELAY, SCROLLBAR_CONTINUOUS_DELAY);
2005#endif 2004#endif
2006 if (scr_page (upordown < 0 ? UP : DN, 1)) 2005 if (scr_page (direction, 1))
2007 { 2006 {
2008 if (upordown < 0) 2007 if (direction == UP)
2009 scrollBar.state = STATE_UP; 2008 scrollBar.state = STATE_UP;
2010 else 2009 else
2011 scrollBar.state = STATE_DOWN; 2010 scrollBar.state = STATE_DOWN;
2012 } 2011 }
2013 } 2012 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines