summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2013-02-03 22:19:31 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2013-02-03 22:19:31 +0000
commit9c7031143f377e066259b999260b7ecb076048bb (patch)
treeeb2b78c80b8041d18bf8bdd27c636099c8a142dd
parentb704ad3e88a1c16f93ccbb23fb5eb60b4f7d3360 (diff)
downloadnetsurf-9c7031143f377e066259b999260b7ecb076048bb.tar.gz
netsurf-9c7031143f377e066259b999260b7ecb076048bb.tar.bz2
Use last known scroll pos, not current
-rwxr-xr-xamiga/gui.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/amiga/gui.c b/amiga/gui.c
index 343952cef..c5f0aab01 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2008-2012 Chris Young <chris@unsatisfactorysoftware.co.uk>
+ * Copyright 2008-2013 Chris Young <chris@unsatisfactorysoftware.co.uk>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -1053,18 +1053,14 @@ void ami_update_quals(struct gui_window_2 *gwin)
bool ami_spacebox_to_ns_coords(struct gui_window_2 *gwin, int *x, int *y,
int space_x, int space_y)
{
- int xs, ys;
int ns_x = space_x;
int ns_y = space_y;
ns_x /= gwin->bw->scale;
ns_y /= gwin->bw->scale;
- ami_get_hscroll_pos(gwin, (ULONG *)&xs);
- ami_get_vscroll_pos(gwin, (ULONG *)&ys);
-
- ns_x += xs;
- ns_y += ys;
+ ns_x += gwin->bw->window->scrollx;
+ ns_y += gwin->bw->window->scrolly;
*x = ns_x;
*y = ns_y;
@@ -3874,7 +3870,7 @@ void ami_do_redraw(struct gui_window_2 *gwin)
if(vcurrent>oldv) /* Going down */
{
- ami_spacebox_to_ns_coords(gwin, &x0, &y0, 0, height - (vcurrent - oldv));
+ ami_spacebox_to_ns_coords(gwin, &x0, &y0, 0, height - (vcurrent - oldv) - 1);
ami_spacebox_to_ns_coords(gwin, &x1, &y1, width + 1, height + 1);
ami_do_redraw_limits(gwin->bw->window, gwin->bw, true, x0, y0, x1, y1);
}