diff -u libgnomecanvas-2.20.1.1/debian/changelog libgnomecanvas-2.20.1.1/debian/changelog --- libgnomecanvas-2.20.1.1/debian/changelog +++ libgnomecanvas-2.20.1.1/debian/changelog @@ -1,3 +1,10 @@ +libgnomecanvas (2.20.1.1-1ubuntu3) intrepid; urgency=low + + * debian/patches/90_upstream_correctly_update.patch: + - updated the patch to fix the redraw issues (lp: #284530) + + -- Joseph M Smith Thu, 30 Oct 2008 14:29:29 -0700 + libgnomecanvas (2.20.1.1-1ubuntu2) intrepid; urgency=low * debian/patches/90_upstream_correctly_update.patch: diff -u libgnomecanvas-2.20.1.1/debian/patches/90_upstream_correctly_update.patch libgnomecanvas-2.20.1.1/debian/patches/90_upstream_correctly_update.patch --- libgnomecanvas-2.20.1.1/debian/patches/90_upstream_correctly_update.patch +++ libgnomecanvas-2.20.1.1/debian/patches/90_upstream_correctly_update.patch @@ -1,5 +1,6 @@ ---- libgnomecanvas/gnome-canvas.c 2007/07/26 11:19:01 1257 -+++ libgnomecanvas/gnome-canvas.c 2007/08/23 16:45:40 1263 +diff -Nur -x '*.orig' -x '*~' libgnomecanvas-2.20.1.1/libgnomecanvas/gnome-canvas.c libgnomecanvas-2.20.1.1.new/libgnomecanvas/gnome-canvas.c +--- libgnomecanvas-2.20.1.1/libgnomecanvas/gnome-canvas.c 2007-10-20 09:00:47.000000000 -0700 ++++ libgnomecanvas-2.20.1.1.new/libgnomecanvas/gnome-canvas.c 2008-10-30 14:25:06.000000000 -0700 @@ -2904,11 +2904,7 @@ return FALSE; } @@ -202,7 +203,15 @@ } /* Expose handler for the canvas */ -@@ -3074,48 +3065,68 @@ +@@ -3049,6 +3040,7 @@ + + if (canvas->need_update || canvas->need_redraw) { + ArtUta *uta; ++ + /* Update or drawing is scheduled, so just mark exposed area as dirty */ + uta = art_uta_from_irect (&rect); + gnome_canvas_request_redraw_uta (canvas, uta); +@@ -3074,48 +3066,68 @@ { ArtIRect *rects; gint n_rects, i; @@ -233,8 +242,8 @@ - /* Send synthetic expose events */ + /* Turn those rectangles into a GdkRegion for exposing */ + -+ visible_rect.x0 = canvas->layout.hadjustment->value; -+ visible_rect.y0 = canvas->layout.vadjustment->value; ++ visible_rect.x0 = canvas->layout.hadjustment->value - canvas->zoom_xofs; ++ visible_rect.y0 = canvas->layout.vadjustment->value - canvas->zoom_yofs; + visible_rect.x1 = visible_rect.x0 + GTK_WIDGET (canvas)->allocation.width; + visible_rect.y1 = visible_rect.y0 + GTK_WIDGET (canvas)->allocation.height; + @@ -244,6 +253,15 @@ - GdkEventExpose ex; - gint x0, y0, x1, y1; + ArtIRect clipped; ++ ++ art_irect_intersect (&clipped, &visible_rect, rects + i); ++ if (!art_irect_empty (&clipped)) { ++ GdkRectangle gdkrect; ++ ++ gdkrect.x = clipped.x0 + canvas->zoom_xofs; ++ gdkrect.y = clipped.y0 + canvas->zoom_yofs; ++ gdkrect.width = clipped.x1 - clipped.x0; ++ gdkrect.height = clipped.y1 - clipped.y0; - x0 = MAX (canvas->layout.hadjustment->value - canvas->zoom_xofs, rects[i].x0); - y0 = MAX (canvas->layout.vadjustment->value - canvas->zoom_yofs, rects[i].y0); @@ -263,15 +281,6 @@ - ex.count = 0; - gtk_widget_send_expose (GTK_WIDGET (canvas), (GdkEvent *) &ex); - gdk_region_destroy (ex.region); -+ art_irect_intersect (&clipped, &visible_rect, rects + i); -+ if (!art_irect_empty (&clipped)) { -+ GdkRectangle gdkrect; -+ -+ gdkrect.x = clipped.x0; -+ gdkrect.y = clipped.y0; -+ gdkrect.width = clipped.x1 - clipped.x0; -+ gdkrect.height = clipped.y1 - clipped.y0; -+ + gdk_region_union_with_rect (region, &gdkrect); } } @@ -303,0 +313,8 @@ +@@ -3189,6 +3201,7 @@ + GDK_THREADS_ENTER (); + + canvas = GNOME_CANVAS (data); ++ + do_update (canvas); + + /* Reset idle id */