summaryrefslogtreecommitdiff
path: root/riscos
diff options
context:
space:
mode:
authorSteve Fryatt <steve@stevefryatt.org.uk>2011-12-17 17:57:16 +0000
committerSteve Fryatt <steve@stevefryatt.org.uk>2011-12-17 17:57:16 +0000
commitdc082c96cb3d90096fe2761f24127a0ad99f5b2d (patch)
treee5a7dac5342c3b719d8bab2e6eea3931cef9873e /riscos
parent80249f5f2a4b2dead38174ebba9cfd4bd114eb0b (diff)
downloadnetsurf-dc082c96cb3d90096fe2761f24127a0ad99f5b2d.tar.gz
netsurf-dc082c96cb3d90096fe2761f24127a0ad99f5b2d.tar.bz2
Look toolbar handles up directly from event data.
svn path=/trunk/netsurf/; revision=13286
Diffstat (limited to 'riscos')
-rw-r--r--riscos/treeview.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/riscos/treeview.c b/riscos/treeview.c
index cb184587d..25181725e 100644
--- a/riscos/treeview.c
+++ b/riscos/treeview.c
@@ -380,10 +380,14 @@ void ro_treeview_scroll(wimp_scroll *scroll)
os_error *error;
int x = scroll->visible.x1 - scroll->visible.x0 - 32;
int y = scroll->visible.y1 - scroll->visible.y0 - 32;
- struct toolbar *toolbar = ro_toolbar_parent_window_lookup(scroll->w);
+ ro_treeview *tv;
+
+ tv = (ro_treeview *) ro_gui_wimp_event_get_user_data(scroll->w);
+ if (tv == NULL)
+ return;
- if (toolbar != NULL)
- y -= ro_toolbar_full_height(toolbar);
+ if (tv->tb != NULL)
+ y -= ro_toolbar_full_height(tv->tb);
switch (scroll->xmin) {
case wimp_SCROLL_PAGE_LEFT: