summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2011-06-28 21:16:37 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2011-06-28 21:16:37 +0000
commitd284ac14d9cbdee89e45bf81833aefdaa3b1b7d7 (patch)
treeddf4cd74c2ed580e5b6f273790b4f6f33a3db745
parent416a6452d520b92d1317b9b52f54e01576cef9df (diff)
downloadnetsurf-d284ac14d9cbdee89e45bf81833aefdaa3b1b7d7.tar.gz
netsurf-d284ac14d9cbdee89e45bf81833aefdaa3b1b7d7.tar.bz2
Front end gets root browser window on notification of scrollbar widget drag start.
svn path=/trunk/netsurf/; revision=12533
-rw-r--r--render/form.c5
-rw-r--r--render/html_interaction.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/render/form.c b/render/form.c
index 7a076c994..10fe3a2be 100644
--- a/render/form.c
+++ b/render/form.c
@@ -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;
diff --git a/render/html_interaction.c b/render/html_interaction.c
index 604621657..9b3ffe6df 100644
--- a/render/html_interaction.c
+++ b/render/html_interaction.c
@@ -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;