summaryrefslogtreecommitdiff
path: root/amiga/gui.c
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2012-04-28 22:53:50 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2012-04-28 22:53:50 +0000
commit682b2f24204940428f33fd69059e8242b42e9e47 (patch)
tree20a9cfd806559a2b913b421f76319c89eedb1a02 /amiga/gui.c
parent8d4678b04b99af40987bef1e006c8ad5ed562115 (diff)
downloadnetsurf-682b2f24204940428f33fd69059e8242b42e9e47.tar.gz
netsurf-682b2f24204940428f33fd69059e8242b42e9e47.tar.bz2
Fix simplerefresh. When dragging windows back on-screen, damaged areas are
still not repaired fully. Overlapping windows have no such problem. Menu events seem to be getting lost in simple refresh mode (this may be related to event triggered for redrawing the area under the menu when it is closed) svn path=/trunk/netsurf/; revision=13895
Diffstat (limited to 'amiga/gui.c')
-rwxr-xr-xamiga/gui.c30
1 files changed, 20 insertions, 10 deletions
diff --git a/amiga/gui.c b/amiga/gui.c
index d8987f19f..a52f9d645 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -3533,18 +3533,24 @@ void ami_do_redraw(struct gui_window_2 *g)
void ami_refresh_window(struct gui_window_2 *gwin)
{
struct IBox *bbox;
- int x0, x1, y0, y1;
+ int x0, x1, y0, y1, sx, sy;
struct RegionRectangle *regrect, *nregrect;
+ sx = gwin->bw->window->scrollx;
+ sy = gwin->bw->window->scrolly;
+
GetAttr(SPACE_AreaBox, (Object *)gwin->objects[GID_BROWSER], (ULONG *)&bbox);
BeginRefresh(gwin->win);
-// probably need to trawl through struct Region *DamageList
- x0 = gwin->win->RPort->Layer->DamageList->bounds.MinX;
- x1 = gwin->win->RPort->Layer->DamageList->bounds.MaxX;
- y0 = gwin->win->RPort->Layer->DamageList->bounds.MinY;
- y1 = gwin->win->RPort->Layer->DamageList->bounds.MaxY;
+ x0 = ((gwin->win->RPort->Layer->DamageList->bounds.MinX - bbox->Left) /
+ browser_window_get_scale(gwin->bw)) + sx;
+ x1 = ((gwin->win->RPort->Layer->DamageList->bounds.MaxX - bbox->Left) /
+ browser_window_get_scale(gwin->bw)) + sx;
+ y0 = ((gwin->win->RPort->Layer->DamageList->bounds.MinY - bbox->Top) /
+ browser_window_get_scale(gwin->bw)) + sy;
+ y1 = ((gwin->win->RPort->Layer->DamageList->bounds.MaxY - bbox->Top) /
+ browser_window_get_scale(gwin->bw)) + sy;
regrect = gwin->win->RPort->Layer->DamageList->RegionRectangle;
@@ -3552,10 +3558,14 @@ void ami_refresh_window(struct gui_window_2 *gwin)
while(regrect)
{
- x0 = regrect->bounds.MinX;
- x1 = regrect->bounds.MaxX;
- y0 = regrect->bounds.MinY;
- y1 = regrect->bounds.MaxY;
+ x0 = ((regrect->bounds.MinX - bbox->Left) /
+ browser_window_get_scale(gwin->bw)) + sx;
+ x1 = ((regrect->bounds.MaxX - bbox->Left) /
+ browser_window_get_scale(gwin->bw)) + sx;
+ y0 = ((regrect->bounds.MinY - bbox->Top) /
+ browser_window_get_scale(gwin->bw)) + sy;
+ y1 = ((regrect->bounds.MaxY - bbox->Top) /
+ browser_window_get_scale(gwin->bw)) + sy;
regrect = regrect->Next;