summaryrefslogtreecommitdiff
path: root/riscos/window.c
diff options
context:
space:
mode:
authorRichard Wilson <rjw@netsurf-browser.org>2005-04-14 01:36:54 +0000
committerRichard Wilson <rjw@netsurf-browser.org>2005-04-14 01:36:54 +0000
commit92b2d468740c72094ae47ab1f72995ec60d93ae6 (patch)
treedea54c275fc831029f2b0f1053ea343ff2762177 /riscos/window.c
parent1d166e2b33968ac1f303ccf4b9168164017ce08f (diff)
downloadnetsurf-92b2d468740c72094ae47ab1f72995ec60d93ae6.tar.gz
netsurf-92b2d468740c72094ae47ab1f72995ec60d93ae6.tar.bz2
[project @ 2005-04-14 01:36:54 by rjw]
Fix redraw errors for standalone images when buffered. svn path=/import/netsurf/; revision=1631
Diffstat (limited to 'riscos/window.c')
-rw-r--r--riscos/window.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/riscos/window.c b/riscos/window.c
index 938a827b6..8cdfbc116 100644
--- a/riscos/window.c
+++ b/riscos/window.c
@@ -440,7 +440,7 @@ void ro_gui_window_redraw(struct gui_window *g, wimp_draw *redraw)
bool clear_partial = false;
float scale = 1;
struct content *c = g->bw->current_content;
- int clip_x0, clip_y0, clip_x1, clip_y1;
+ int clip_x0, clip_y0, clip_x1, clip_y1, clear_x1, clear_y1;
int content_y1, content_x1;
os_error *error;
osspriteop_area *area;
@@ -509,6 +509,8 @@ void ro_gui_window_redraw(struct gui_window *g, wimp_draw *redraw)
clip_y0 = (ro_plot_origin_y - redraw->clip.y1) / 2;
clip_x1 = (redraw->clip.x1 - ro_plot_origin_x) / 2;
clip_y1 = (ro_plot_origin_y - redraw->clip.y0) / 2;
+ clear_x1 = redraw->clip.x1 - ro_plot_origin_x;
+ clear_y1 = redraw->clip.y0 - ro_plot_origin_y;
if (ro_gui_current_redraw_gui->option.buffer_everything)
ro_gui_buffer_open(redraw);
@@ -525,20 +527,22 @@ void ro_gui_window_redraw(struct gui_window *g, wimp_draw *redraw)
if (clear_partial) {
content_x1 = ro_plot_origin_x + c->width * 2 * scale;
content_y1 = ro_plot_origin_y - c->height * 2 * scale;
- if (content_y1 > redraw->clip.y0) {
+ clear_x1 += ro_plot_origin_x;
+ clear_y1 += ro_plot_origin_y;
+ if (content_y1 > clear_y1) {
xos_plot(os_MOVE_TO,
ro_plot_origin_x,
content_y1);
xos_plot(os_PLOT_BG_TO | os_PLOT_RECTANGLE,
- redraw->clip.x1,
- redraw->clip.y0);
+ clear_x1,
+ clear_y1);
}
if (content_x1 < redraw->clip.x1) {
xos_plot(os_MOVE_TO,
content_x1,
ro_plot_origin_y);
xos_plot(os_PLOT_BG_TO | os_PLOT_RECTANGLE,
- redraw->clip.x1,
+ clear_x1,
content_y1);
}
} else {