Front end gets root browser window on notification of scrollbar widget drag start.

svn path=/trunk/netsurf/; revision=12533
This commit is contained in:
Michael Drake 2011-06-28 21:16:37 +00:00
parent 416a6452d5
commit d284ac14d9
2 changed files with 8 additions and 2 deletions

View File

@ -1286,6 +1286,7 @@ void form_select_menu_scroll_callback(void *client_data,
struct form_control *control = client_data;
struct form_select_menu *menu = control->data.select.menu;
html_content *html = (html_content *)menu->c;
struct browser_window *root_bw;
switch (scrollbar_data->msg) {
case SCROLLBAR_MSG_REDRAW:
@ -1306,7 +1307,9 @@ void form_select_menu_scroll_callback(void *client_data,
browser_window_set_drag_type(html->bw, DRAGGING_OTHER);
menu->scroll_capture = true;
gui_window_box_scroll_start(html->bw->window,
root_bw = browser_window_get_root(html->bw);
gui_window_box_scroll_start(root_bw->window,
scrollbar_data->x0, scrollbar_data->y0,
scrollbar_data->x1, scrollbar_data->y1);
break;

View File

@ -774,6 +774,7 @@ void html_overflow_scroll_callback(void *client_data,
html_content *html = (html_content *)data->c;
struct box *box = data->box;
int x, y, box_x, box_y, diff_x, diff_y;
struct browser_window *root_bw;
switch(scrollbar_data->msg) {
@ -807,7 +808,9 @@ void html_overflow_scroll_callback(void *client_data,
browser_window_set_drag_type(html->bw, DRAGGING_OTHER);
html->scrollbar = scrollbar_data->scrollbar;
gui_window_box_scroll_start(html->bw->window,
root_bw = browser_window_get_root(html->bw);
gui_window_box_scroll_start(root_bw->window,
scrollbar_data->x0, scrollbar_data->y0,
scrollbar_data->x1, scrollbar_data->y1);
break;