diff options
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/browser.c | 9 | ||||
-rw-r--r-- | desktop/browser.h | 3 |
2 files changed, 8 insertions, 4 deletions
diff --git a/desktop/browser.c b/desktop/browser.c index 1ffc12e29..553baefc3 100644 --- a/desktop/browser.c +++ b/desktop/browser.c @@ -91,10 +91,12 @@ static void browser_window_find_target_internal(struct browser_window *bw, /* exported interface, documented in browser.h */ bool browser_window_redraw(struct browser_window *bw, int x, int y, - int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1) { + int width = 0; + int height = 0; + if (bw == NULL) { LOG(("NULL browser window")); return false; @@ -106,6 +108,11 @@ bool browser_window_redraw(struct browser_window *bw, return plot.rectangle(clip_x0, clip_y0, clip_x1, clip_y1, plot_style_fill_white); } + + if (content_get_type(bw->current_content) != CONTENT_HTML) { + width = content_get_width(bw->current_content) * bw->scale; + height = content_get_height(bw->current_content) * bw->scale; + } return content_redraw(bw->current_content, x, y, width, height, clip_x0, clip_y0, clip_x1, clip_y1, diff --git a/desktop/browser.h b/desktop/browser.h index 2c16c9732..e2410ae95 100644 --- a/desktop/browser.h +++ b/desktop/browser.h @@ -259,8 +259,6 @@ bool browser_window_stop_available(struct browser_window *bw); * \param bw The window to redraw * \param x coordinate for top-left of redraw * \param y coordinate for top-left of redraw - * \param width available width (not used for HTML redraw) - * \param height available height (not used for HTML redraw) * \param clip_x0 clip rectangle left * \param clip_y0 clip rectangle top * \param clip_x1 clip rectangle right @@ -275,7 +273,6 @@ bool browser_window_stop_available(struct browser_window *bw); */ bool browser_window_redraw(struct browser_window *bw, int x, int y, - int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1); |