diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2010-04-11 12:13:53 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2010-04-11 12:13:53 +0000 |
commit | 580fa084de560f5c3906746504f9f9ad9fb8459f (patch) | |
tree | be3a18472e5c94d360cef0ca1f20f8a21328b9c5 | |
parent | 737d6ad557a7ee6300cb6c02cf0d32ed55b13531 (diff) | |
download | netsurf-580fa084de560f5c3906746504f9f9ad9fb8459f.tar.gz netsurf-580fa084de560f5c3906746504f9f9ad9fb8459f.tar.bz2 |
Fix window updates when main window is scrolled.
svn path=/trunk/netsurf/; revision=10347
-rw-r--r-- | gtk/gtk_window.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gtk/gtk_window.c b/gtk/gtk_window.c index cd50bea7a..cf0991096 100644 --- a/gtk/gtk_window.c +++ b/gtk/gtk_window.c @@ -794,8 +794,12 @@ void nsgtk_redraw_caret(struct gui_window *g) void gui_window_redraw(struct gui_window *g, int x0, int y0, int x1, int y1) { + int sx, sy; + + gui_window_get_scroll(g, &sx, &sy); + gtk_widget_queue_draw_area(GTK_WIDGET(g->layout), - x0, y0, x1-x0+1, y1-y0+1); + x0 - sx, y0 - sy, x1-x0+1, y1-y0+1); } void gui_window_redraw_window(struct gui_window *g) @@ -806,14 +810,17 @@ void gui_window_redraw_window(struct gui_window *g) void gui_window_update_box(struct gui_window *g, const union content_msg_data *data) { + int sx, sy; hlcache_handle *c = g->bw->current_content; if (c == NULL) return; + gui_window_get_scroll(g, &sx, &sy); + gtk_widget_queue_draw_area(GTK_WIDGET(g->layout), - data->redraw.x * g->bw->scale, - data->redraw.y * g->bw->scale, + data->redraw.x * g->bw->scale - sx, + data->redraw.y * g->bw->scale - sy, data->redraw.width * g->bw->scale, data->redraw.height * g->bw->scale); } |