diff options
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/browser.c | 12 | ||||
-rw-r--r-- | desktop/gui.h | 1 |
2 files changed, 12 insertions, 1 deletions
diff --git a/desktop/browser.c b/desktop/browser.c index 64edaf728..337d6f0df 100644 --- a/desktop/browser.c +++ b/desktop/browser.c @@ -199,6 +199,7 @@ void browser_window_callback(content_msg msg, struct content *c, void *p1, void *p2, const char *error) { struct browser_window *bw = p1; + struct box *box; char status[40]; if (c->type == CONTENT_OTHER) { @@ -277,7 +278,16 @@ void browser_window_callback(content_msg msg, struct content *c, break; case CONTENT_MSG_REDRAW: - gui_window_redraw_window(bw->window); + /* error actually holds the box */ + box = (struct box *) error; + if (box) { + int x, y; + box_coords(box, &x, &y); + gui_window_update_box(bw->window, x, y, + x + box->width, + y + box->height); + } else + gui_window_redraw_window(bw->window); break; #ifdef WITH_AUTH diff --git a/desktop/gui.h b/desktop/gui.h index 3554a87ee..62dcf27a7 100644 --- a/desktop/gui.h +++ b/desktop/gui.h @@ -28,6 +28,7 @@ void gui_window_hide(gui_window* g); void gui_window_redraw(gui_window* g, unsigned long x0, unsigned long y0, unsigned long x1, unsigned long y1); void gui_window_redraw_window(gui_window* g); +void gui_window_update_box(gui_window *g, int x0, int y0, int x1, int y1); void gui_window_set_scroll(gui_window* g, unsigned long sx, unsigned long sy); unsigned long gui_window_get_width(gui_window* g); void gui_window_set_extent(gui_window* g, unsigned long width, unsigned long height); |