summaryrefslogtreecommitdiff
path: root/amiga/gui.c
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2012-02-24 23:18:24 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2012-02-24 23:18:24 +0000
commit20e825c8f44871c7ed234aa67260c794f6ef20ed (patch)
treece921fa622ba856d67b51303963faf72dc7a5ace /amiga/gui.c
parentce0d2193284e125e522acec73bbf1e41a3486fb6 (diff)
downloadnetsurf-20e825c8f44871c7ed234aa67260c794f6ef20ed.tar.gz
netsurf-20e825c8f44871c7ed234aa67260c794f6ef20ed.tar.bz2
More simple refresh. This would work (provided the user hasn't scrolled),
however we appear to be losing events (refresh and menu events are not always being received) svn path=/trunk/netsurf/; revision=13466
Diffstat (limited to 'amiga/gui.c')
-rwxr-xr-xamiga/gui.c35
1 files changed, 29 insertions, 6 deletions
diff --git a/amiga/gui.c b/amiga/gui.c
index ad3c606de..37ed3aca1 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -17,7 +17,7 @@
*/
/* define this to use simple (as opposed to smart) refresh windows */
-#undef AMI_SIMPLEREFRESH
+//#define AMI_SIMPLEREFRESH 1
/* NetSurf core includes */
#include "content/urldb.h"
@@ -2662,7 +2662,11 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
WA_Height,curh,
WA_CustomScreen,scrn,
WA_ReportMouse,TRUE,
+#ifdef AMI_SIMPLEREFRESH
+ WA_SimpleRefresh,TRUE,
+#else
WA_SmartRefresh,TRUE,
+#endif
WA_SizeBBottom, TRUE,
WA_IDCMP,IDCMP_MENUPICK | IDCMP_MOUSEMOVE |
IDCMP_MOUSEBUTTONS | IDCMP_NEWSIZE |
@@ -3506,19 +3510,34 @@ void ami_refresh_window(struct gui_window_2 *gwin)
{
struct IBox *bbox;
int x0, x1, y0, y1;
+ struct RegionRectangle *regrect, *nregrect;
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->bounds.MinX;
- x1 = gwin->win->RPort->Layer->bounds.MaxX;
- y0 = gwin->win->RPort->Layer->bounds.MinY;
- y1 = gwin->win->RPort->Layer->bounds.MaxY;
+ 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;
+
+ regrect = gwin->win->RPort->Layer->DamageList->RegionRectangle;
ami_do_redraw_limits(gwin->bw->window, gwin->bw, x0, y0, x1, y1);
+ while(regrect)
+ {
+ x0 = regrect->bounds.MinX;
+ x1 = regrect->bounds.MaxX;
+ y0 = regrect->bounds.MinY;
+ y1 = regrect->bounds.MaxY;
+
+ regrect = regrect->Next;
+
+ ami_do_redraw_limits(gwin->bw->window, gwin->bw, x0, y0, x1, y1);
+ }
+
/* quick refresh - scuppered by shared offscreen bitmap
BltBitMapTags(BLITA_SrcType, BLITT_BITMAP,
BLITA_Source, browserglob.bm,
@@ -4004,9 +4023,13 @@ void ami_scroller_hook(struct Hook *hook,Object *object,struct IntuiMessage *msg
#ifdef AMI_SIMPLEREFRESH
case IDCMP_REFRESHWINDOW:
-printf("refreshing\n");
+//printf("refreshing\n");
ami_refresh_window(gwin);
break;
+
+ default:
+ printf("UNHANDLED EVENT %ld\n",msg->Class);
+ break;
#endif
}
// ReplyMsg((struct Message *)msg);