summaryrefslogtreecommitdiff
path: root/riscos
diff options
context:
space:
mode:
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: