From dc082c96cb3d90096fe2761f24127a0ad99f5b2d Mon Sep 17 00:00:00 2001 From: Steve Fryatt Date: Sat, 17 Dec 2011 17:57:16 +0000 Subject: Look toolbar handles up directly from event data. svn path=/trunk/netsurf/; revision=13286 --- riscos/treeview.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'riscos') 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: -- cgit v1.2.3