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.400 by ayin, Mon Jan 28 12:54:47 2008 UTC vs.
Revision 1.401 by ayin, Tue Jan 29 13:57:23 2008 UTC

1553 while (XCheckTypedWindowEvent (dpy, ev.xany.window, GraphicsExpose, &unused_event)) 1553 while (XCheckTypedWindowEvent (dpy, ev.xany.window, GraphicsExpose, &unused_event))
1554 ; 1554 ;
1555 1555
1556 if (scrollBar.state && ev.xany.window == scrollBar.win) 1556 if (scrollBar.state && ev.xany.window == scrollBar.win)
1557 { 1557 {
1558 scrollBar.setIdle (); 1558 scrollBar.state = STATE_IDLE;
1559 scrollbar_show (0); 1559 scrollbar_show (0);
1560 } 1560 }
1561 } 1561 }
1562 break; 1562 break;
1563 1563
1651#ifdef MOUSE_THRESHOLD 1651#ifdef MOUSE_THRESHOLD
1652 } 1652 }
1653#endif 1653#endif
1654 } 1654 }
1655 } 1655 }
1656 else if (scrollbar_isMotion () && ev.xany.window == scrollBar.win) 1656 else if (scrollBar.state == STATE_MOTION && ev.xany.window == scrollBar.win)
1657 { 1657 {
1658 while (XCheckTypedWindowEvent (dpy, scrollBar.win, 1658 while (XCheckTypedWindowEvent (dpy, scrollBar.win,
1659 MotionNotify, &ev)) 1659 MotionNotify, &ev))
1660 ; 1660 ;
1661 1661
1954 if (scrollBar.upButton (ev.y)) 1954 if (scrollBar.upButton (ev.y))
1955 upordown = -1; /* up */ 1955 upordown = -1; /* up */
1956 else if (scrollBar.dnButton (ev.y)) 1956 else if (scrollBar.dnButton (ev.y))
1957 upordown = 1; /* down */ 1957 upordown = 1; /* down */
1958 1958
1959 scrollBar.setIdle (); 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
1963 * move dn if mouse is below slider 1963 * move dn if mouse is below slider
1964 * 1964 *
2004 cont_scroll_ev.start (SCROLLBAR_INITIAL_DELAY, SCROLLBAR_CONTINUOUS_DELAY); 2004 cont_scroll_ev.start (SCROLLBAR_INITIAL_DELAY, SCROLLBAR_CONTINUOUS_DELAY);
2005#endif 2005#endif
2006 if (scr_page (upordown < 0 ? UP : DN, 1)) 2006 if (scr_page (upordown < 0 ? UP : DN, 1))
2007 { 2007 {
2008 if (upordown < 0) 2008 if (upordown < 0)
2009 scrollBar.setUp (); 2009 scrollBar.state = STATE_UP;
2010 else 2010 else
2011 scrollBar.setDn (); 2011 scrollBar.state = STATE_DOWN;
2012 } 2012 }
2013 } 2013 }
2014 else 2014 else
2015 switch (ev.button) 2015 switch (ev.button)
2016 { 2016 {
2031 if (scrollBar.style == R_SB_XTERM 2031 if (scrollBar.style == R_SB_XTERM
2032 || scrollbar_above_slider (ev.y) 2032 || scrollbar_above_slider (ev.y)
2033 || scrollbar_below_slider (ev.y)) 2033 || scrollbar_below_slider (ev.y))
2034 scr_move_to (scrollbar_position (ev.y) - csrO, scrollbar_size ()); 2034 scr_move_to (scrollbar_position (ev.y) - csrO, scrollbar_size ());
2035 2035
2036 scrollBar.setMotion (); 2036 scrollBar.state = STATE_MOTION;
2037 break; 2037 break;
2038 2038
2039 case Button1: 2039 case Button1:
2040 if (scrollBar.align == R_SB_ALIGN_CENTRE) 2040 if (scrollBar.align == R_SB_ALIGN_CENTRE)
2041 csrO = ev.y - scrollBar.top; 2041 csrO = ev.y - scrollBar.top;
2055 scr_page (DN, nrow - 1); 2055 scr_page (DN, nrow - 1);
2056# else 2056# else
2057 scr_page (DN, nrow / 4); 2057 scr_page (DN, nrow / 4);
2058# endif 2058# endif
2059 else 2059 else
2060 scrollBar.setMotion (); 2060 scrollBar.state = STATE_MOTION;
2061 } 2061 }
2062 else 2062 else
2063 { 2063 {
2064 scr_page ((ev.button == Button1 ? DN : UP), 2064 scr_page ((ev.button == Button1 ? DN : UP),
2065 (nrow 2065 (nrow
2082 2082
2083 csrO = 0; /* reset csr Offset */ 2083 csrO = 0; /* reset csr Offset */
2084 if (!bypass_keystate) 2084 if (!bypass_keystate)
2085 reportmode = !! (priv_modes & PrivMode_mouse_report); 2085 reportmode = !! (priv_modes & PrivMode_mouse_report);
2086 2086
2087 if (scrollbar_isUpDn ()) 2087 if (scrollBar.state == STATE_UP || scrollBar.state == STATE_DOWN)
2088 { 2088 {
2089 scrollBar.setIdle (); 2089 scrollBar.state = STATE_IDLE;
2090 scrollbar_show (0); 2090 scrollbar_show (0);
2091 } 2091 }
2092 2092
2093#ifdef SELECTION_SCROLLING 2093#ifdef SELECTION_SCROLLING
2094 sel_scroll_ev.stop(); 2094 sel_scroll_ev.stop();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines