From 9a183018ea9c7d58a6aa71a2afb92271c4207e01 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Fri, 11 Feb 2011 00:14:22 +0000 Subject: improve browser_window_redraw width and height handling svn path=/trunk/netsurf/; revision=11642 --- gtk/window.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'gtk') diff --git a/gtk/window.c b/gtk/window.c index 06bc97df0..488423bcb 100644 --- a/gtk/window.c +++ b/gtk/window.c @@ -157,8 +157,6 @@ static gboolean nsgtk_window_expose_event(GtkWidget *widget, { struct gui_window *g = data; struct gui_window *z; - int width = 0; - int height = 0; assert(g); assert(g->bw); @@ -168,17 +166,6 @@ static gboolean nsgtk_window_expose_event(GtkWidget *widget, assert(z); assert(GTK_WIDGET(g->layout) == widget); - /* set the width and height to use */ - if (g->bw->current_content != NULL) { - width = content_get_width(g->bw->current_content); - height = content_get_height(g->bw->current_content); - - if (content_get_type(g->bw->current_content) != CONTENT_HTML) { - /* HTML rendering handles scale itself */ - width *= g->bw->scale; - height *= g->bw->scale; - } - } current_widget = (GtkWidget *)g->layout; current_drawable = g->layout->bin_window; @@ -191,7 +178,7 @@ static gboolean nsgtk_window_expose_event(GtkWidget *widget, nsgtk_plot_set_scale(g->bw->scale); current_redraw_browser = g->bw; - browser_window_redraw(g->bw, 0, 0, width, height, + browser_window_redraw(g->bw, 0, 0, event->area.x, event->area.y, event->area.x + event->area.width, event->area.y + event->area.height); -- cgit v1.2.3