When redrawing part of a page, draw with respect to the position NetSurf believes the

scrollbars are in, rather than where they actually are.  This resolves an issue with
graphical corruption and animations, when using the scrollbars to scroll the page (the
anim redraw was happening before the event to say the scrollbar had moved was being
received)

svn path=/trunk/netsurf/; revision=10563
This commit is contained in:
Chris Young 2010-06-05 09:59:38 +00:00
parent 6c59c80ed5
commit 5753d59505

View File

@ -3003,8 +3003,8 @@ void gui_window_set_title(struct gui_window *g, const char *title)
* \param y0 top-left co-ordinate (in document co-ordinates) * \param y0 top-left co-ordinate (in document co-ordinates)
* \param x1 bottom-right co-ordinate (in document co-ordinates) * \param x1 bottom-right co-ordinate (in document co-ordinates)
* \param y1 bottom-right co-ordinate (in document co-ordinates) * \param y1 bottom-right co-ordinate (in document co-ordinates)
* \param sx horizontal scroller position * \param sx horizontal scroller position (currently ignored/overridden)
* \param sy vertical scroller position * \param sy vertical scroller position (currently ignored/overridden)
*/ */
void ami_do_redraw_limits(struct gui_window *g, hlcache_handle *c,int x0, int y0, int x1, int y1, ULONG sx, ULONG sy) void ami_do_redraw_limits(struct gui_window *g, hlcache_handle *c,int x0, int y0, int x1, int y1, ULONG sx, ULONG sy)
@ -3016,6 +3016,9 @@ void ami_do_redraw_limits(struct gui_window *g, hlcache_handle *c,int x0, int y0
if(!g) return; if(!g) return;
sx = g->scrollx;
sy = g->scrolly;
if(g->tab_node && (g->shared->tabs > 1)) GetAttr(CLICKTAB_Current, if(g->tab_node && (g->shared->tabs > 1)) GetAttr(CLICKTAB_Current,
g->shared->objects[GID_TABS], (ULONG *)&cur_tab); g->shared->objects[GID_TABS], (ULONG *)&cur_tab);
@ -3088,6 +3091,9 @@ void gui_window_redraw(struct gui_window *g, int x0, int y0, int x1, int y1)
{ {
ULONG sx,sy; ULONG sx,sy;
hlcache_handle *c; hlcache_handle *c;
if(!g) return;
c = g->shared->bw->current_content; c = g->shared->bw->current_content;
ami_get_hscroll_pos(g->shared, (ULONG *)&sx); ami_get_hscroll_pos(g->shared, (ULONG *)&sx);
@ -3735,6 +3741,8 @@ void ami_scroller_hook(struct Hook *hook,Object *object,struct IntuiMessage *msg
if(option_faster_scroll) if(option_faster_scroll)
gwin->redraw_scroll = true; gwin->redraw_scroll = true;
else gwin->redraw_scroll = false;
gwin->redraw_required = true; gwin->redraw_required = true;
break; break;
} }