Mouse button holding wasn't reported to the browser because of drag optimization, resulting in internal scrollbars which only reacted on click, not mouse holding down.
svn path=/trunk/netsurf/; revision=13415
This commit is contained in:
parent
0fad29846b
commit
132ebb7dd9
|
@ -251,7 +251,8 @@ static void __CDECL browser_evnt_mbutton( COMPONENT * c, long buff[8], void * da
|
|||
int sy_origin = (my + gw->browser->scroll.current.y);
|
||||
|
||||
short rel_cur_x, rel_cur_y;
|
||||
short prev_x=sx_origin, prev_y=sy_origin;
|
||||
short prev_x=sx_origin, prev_y=sy_origin;
|
||||
bool dragmode = 0;
|
||||
|
||||
/* Detect left mouse button state and compare with event state: */
|
||||
graf_mkstate(&rel_cur_x, &rel_cur_y, &mbut, &dummy);
|
||||
|
@ -265,13 +266,19 @@ static void __CDECL browser_evnt_mbutton( COMPONENT * c, long buff[8], void * da
|
|||
do{
|
||||
if( abs(prev_x-rel_cur_x) > 5 || abs(prev_y-rel_cur_y) > 5 ){
|
||||
browser_window_mouse_track( gw->browser->bw,
|
||||
BROWSER_MOUSE_DRAG_ON|BROWSER_MOUSE_HOLDING_1,
|
||||
BROWSER_MOUSE_DRAG_ON|BROWSER_MOUSE_DRAG_1,
|
||||
rel_cur_x, rel_cur_y);
|
||||
prev_x = rel_cur_x;
|
||||
prev_y = rel_cur_y;
|
||||
if( browser_redraw_required( gw ) ){
|
||||
browser_redraw( gw );
|
||||
}
|
||||
prev_y = rel_cur_y;
|
||||
dragmode = true;
|
||||
} else {
|
||||
if( dragmode == false ){
|
||||
browser_window_mouse_track( gw->browser->bw,BROWSER_MOUSE_PRESS_1,
|
||||
rel_cur_x, rel_cur_y);
|
||||
}
|
||||
}
|
||||
if( browser_redraw_required( gw ) ){
|
||||
browser_redraw( gw );
|
||||
}
|
||||
graf_mkstate(&rel_cur_x, &rel_cur_y, &mbut, &dummy);
|
||||
rel_cur_x = (rel_cur_x - cwork.g_x) + gw->browser->scroll.current.x;
|
||||
|
|
Loading…
Reference in New Issue