Fri Jan 21 12:52:26 PST 2000 Michael Jennings <mej@eterm.org>
Fixed an off-by-one error in the scrollbar click-handling pointed out by Malcolm Tredinnick <malcolmt@smart.net.au>. SVN revision: 1958
This commit is contained in:
parent
baa4e7ee51
commit
8cb728ab7f
|
@ -3072,3 +3072,9 @@ Tue Jan 18 21:17:24 PST 2000 Michael Jennings <mej@eterm.org>
|
|||
menus. Also added arrows for submenus.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Fri Jan 21 12:52:26 PST 2000 Michael Jennings <mej@eterm.org>
|
||||
|
||||
Fixed an off-by-one error in the scrollbar click-handling pointed out
|
||||
by Malcolm Tredinnick <malcolmt@smart.net.au>.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
|
|
@ -252,10 +252,9 @@ sb_handle_button_press(event_t * ev)
|
|||
break;
|
||||
|
||||
case Button1:
|
||||
button_state.mouse_offset = MAX(ev->xbutton.y, 1);
|
||||
button_state.mouse_offset = ((scrollbar_win_is_anchor(ev->xany.window)) ? (MAX(ev->xbutton.y, 1)) : (1));
|
||||
/* drop */
|
||||
case Button3:
|
||||
D_SCROLLBAR((" -> Scrollbar type is %u\n", scrollbar_get_type()));
|
||||
#if defined(MOTIF_SCROLLBAR) || defined(NEXT_SCROLLBAR)
|
||||
if (scrollbar.type == SCROLLBAR_MOTIF || scrollbar.type == SCROLLBAR_NEXT) {
|
||||
if (scrollbar_is_above_anchor(ev->xany.window, ev->xbutton.y)) {
|
||||
|
|
|
@ -76,8 +76,8 @@
|
|||
#define scrollbar_arrow_height() (scrollbar.width)
|
||||
|
||||
/* Scrollbar positions */
|
||||
#define scrollbar_is_above_anchor(w, y) (!scrollbar_win_is_anchor(w) && ((y) < scrollbar.anchor_top))
|
||||
#define scrollbar_is_below_anchor(w, y) (!scrollbar_win_is_anchor(w) && ((y) > scrollbar.anchor_bottom))
|
||||
#define scrollbar_is_above_anchor(w, y) (!scrollbar_win_is_anchor(w) && ((y) <= scrollbar.anchor_top))
|
||||
#define scrollbar_is_below_anchor(w, y) (!scrollbar_win_is_anchor(w) && ((y) >= scrollbar.anchor_bottom))
|
||||
#define scrollbar_position(y) ((y) - scrollbar.scrollarea_start)
|
||||
#define scrollbar_up_loc() (scrollbar.up_arrow_loc)
|
||||
#define scrollbar_dn_loc() (scrollbar.down_arrow_loc)
|
||||
|
|
Loading…
Reference in New Issue