summaryrefslogtreecommitdiff
path: root/desktop/browser.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2017-03-01 23:30:29 +0000
committerVincent Sanders <vince@kyllikki.org>2017-03-01 23:30:29 +0000
commit44c5aef1c8a79a3a9afbd472d1f6e6e238c8ed5c (patch)
treefc1a9296fa54f72da331f92c952c14e16ad63370 /desktop/browser.c
parent2f5e5620e218d317d5e853fd4ee9d9123b346610 (diff)
downloadnetsurf-44c5aef1c8a79a3a9afbd472d1f6e6e238c8ed5c.tar.gz
netsurf-44c5aef1c8a79a3a9afbd472d1f6e6e238c8ed5c.tar.bz2
make scrollbar redraw signal errors correctly
allow scrollbar redraw to return error codes and update documentation commenst appropriately.
Diffstat (limited to 'desktop/browser.c')
-rw-r--r--desktop/browser.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/desktop/browser.c b/desktop/browser.c
index 3a7ac0ecc..d0114ef9d 100644
--- a/desktop/browser.c
+++ b/desktop/browser.c
@@ -154,8 +154,11 @@ browser_window_set_name(struct browser_window *bw, const char *name)
}
/* exported interface, documented in browser.h */
-bool browser_window_redraw(struct browser_window *bw, int x, int y,
- const struct rect *clip, const struct redraw_context *ctx)
+bool
+browser_window_redraw(struct browser_window *bw,
+ int x, int y,
+ const struct rect *clip,
+ const struct redraw_context *ctx)
{
struct redraw_context new_ctx = *ctx;
int width = 0;
@@ -164,6 +167,7 @@ bool browser_window_redraw(struct browser_window *bw, int x, int y,
content_type content_type;
struct content_redraw_data data;
struct rect content_clip;
+ nserror res;
if (bw == NULL) {
LOG("NULL browser window");
@@ -299,16 +303,22 @@ bool browser_window_redraw(struct browser_window *bw, int x, int y,
if (bw->scroll_x != NULL) {
browser_window_get_scrollbar_pos(bw, true,
&off_x, &off_y);
- plot_ok &= scrollbar_redraw(bw->scroll_x,
+ res = scrollbar_redraw(bw->scroll_x,
x + off_x, y + off_y, clip,
bw->scale, &new_ctx);
+ if (res != NSERROR_OK) {
+ plot_ok = false;
+ }
}
if (bw->scroll_y != NULL) {
browser_window_get_scrollbar_pos(bw, false,
&off_x, &off_y);
- plot_ok &= scrollbar_redraw(bw->scroll_y,
+ res = scrollbar_redraw(bw->scroll_y,
x + off_x, y + off_y, clip,
bw->scale, &new_ctx);
+ if (res != NSERROR_OK) {
+ plot_ok = false;
+ }
}
}