summaryrefslogtreecommitdiff
path: root/amiga
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2009-03-14 16:18:09 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2009-03-14 16:18:09 +0000
commitd3d7fc7c66427870096a402c237b545b2327f8bc (patch)
tree08ac67278f4797b54e8fc629c9e0f65ab24be7b0 /amiga
parent8e00cd50b181f8522d08760d64fe80fbe7a731bb (diff)
downloadnetsurf-d3d7fc7c66427870096a402c237b545b2327f8bc.tar.gz
netsurf-d3d7fc7c66427870096a402c237b545b2327f8bc.tar.bz2
Stop browser resizes from crashing.
I really don't like using Forbid() and Permit() but the lock-up seems to be caused by the window continuing the resize while the reformat is taking place and this appears to be the only way to stop it. Resizes are relatively rare so shouldn't cause problems. svn path=/trunk/netsurf/; revision=6784
Diffstat (limited to 'amiga')
-rwxr-xr-xamiga/gui.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/amiga/gui.c b/amiga/gui.c
index a72c29354..8941cf38c 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -1065,8 +1065,10 @@ void ami_handle_msg(void)
ami_update_throbber(gwin,true);
// fall through
case AMINS_FRAME:
- GetAttr(SPACE_AreaBox,gwin->gadgets[GID_BROWSER],(ULONG *)&bbox);
- browser_window_reformat(gwin->bw,bbox->Width,bbox->Height);
+ //GetAttr(SPACE_AreaBox,gwin->gadgets[GID_BROWSER],(ULONG *)&bbox);
+ //browser_reformat_pending = true;
+ gwin->bw->reformat_pending = true;
+ //browser_window_reformat(gwin->bw,bbox->Width,bbox->Height);
gwin->redraw_required = true;
break;
}
@@ -2196,8 +2198,7 @@ void ami_do_redraw(struct gui_window_2 *g,bool scroll)
if (c->locked) return;
current_redraw_browser = g->bw;
-
-// currp = &glob.rp;
+ currp = &glob.rp;
width=bbox->Width;
height=bbox->Height;
@@ -2205,6 +2206,15 @@ void ami_do_redraw(struct gui_window_2 *g,bool scroll)
yoffset=bbox->Top;
plot = amiplot;
+ if(g->bw->reformat_pending)
+ {
+ Forbid();
+ browser_window_reformat(g->bw,width,height);
+ Permit();
+ g->bw->reformat_pending = false;
+ scroll = FALSE;
+ }
+
// if (c->type == CONTENT_HTML) scale = 1;
if(scroll && c->type == CONTENT_HTML)