rpms/libgnomecanvas/devel zoom-redraw-fix.patch, NONE, 1.1 libgnomecanvas.spec, 1.44, 1.45

Matthias Clasen (mclasen) fedora-extras-commits at redhat.com
Mon Nov 12 19:38:24 UTC 2007


Author: mclasen

Update of /cvs/extras/rpms/libgnomecanvas/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6489

Modified Files:
	libgnomecanvas.spec 
Added Files:
	zoom-redraw-fix.patch 
Log Message:
re-add the tear avoidance patch, with an extra zoom redraw fix


zoom-redraw-fix.patch:

--- NEW FILE zoom-redraw-fix.patch ---
2007-11-05  Federico Mena Quintero  <federico at novell.com>

	Fix these bugs:
	http://bugzilla.gnome.org/show_bug.cgi?id=493808
	https://bugzilla.novell.com/show_bug.cgi?id=336941

	* libgnomecanvas/gnome-canvas.c (paint): Oops, use the correct
	visible rectangle; we forgot to take the zoom_{x,y}ofs into
	account.  Also, take those offsets into account when generating
	the actual rectangle to be added to the GdkRegion.

diff --git a/libgnomecanvas/gnome-canvas.c b/libgnomecanvas/gnome-canvas.c
index 5e89bc2..ca9769f 100644
--- a/libgnomecanvas/gnome-canvas.c
+++ b/libgnomecanvas/gnome-canvas.c
@@ -3040,6 +3040,7 @@ gnome_canvas_expose (GtkWidget *widget, GdkEventExpose *event)
 
 		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);
@@ -3082,8 +3083,8 @@ paint (GnomeCanvas *canvas)
 
 	/* 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;
 
@@ -3096,8 +3097,8 @@ paint (GnomeCanvas *canvas)
 		if (!art_irect_empty (&clipped)) {
 			GdkRectangle gdkrect;
 
-			gdkrect.x = clipped.x0;
-			gdkrect.y = clipped.y0;
+			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;
 
@@ -3200,6 +3201,7 @@ idle_handler (gpointer data)
 	GDK_THREADS_ENTER ();
 
 	canvas = GNOME_CANVAS (data);
+
 	do_update (canvas);
 
 	/* Reset idle id */


Index: libgnomecanvas.spec
===================================================================
RCS file: /cvs/extras/rpms/libgnomecanvas/devel/libgnomecanvas.spec,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- libgnomecanvas.spec	16 Oct 2007 00:48:08 -0000	1.44
+++ libgnomecanvas.spec	12 Nov 2007 19:37:50 -0000	1.45
@@ -8,9 +8,11 @@
 Summary: GnomeCanvas widget
 Name: libgnomecanvas
 Version: 2.20.1
-Release: 1%{?dist}
+Release: 2%{?dist}
 URL: http://www.gnome.org/
 Source0: http://download.gnome.org/sources/libgnomecanvas/2.20/%{name}-%{version}.tar.bz2
+Patch0: libgnomecanvas-2.19.2-avoid-tearing.patch
+Patch1: zoom-redraw-fix.patch
 License: LGPLv2+
 Group: System Environment/Libraries 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 
@@ -47,6 +49,8 @@
 
 %prep
 %setup -q
+%patch0 -p1 -b .avoid-tearing
+%patch1 -p1 -b .zoom-redraw-fix
 
 %build
 export CFLAGS=$(echo $RPM_OPT_FLAGS |sed -e 's/O2/O1/g')
@@ -87,6 +91,9 @@
 %{_datadir}/gtk-doc/html/libgnomecanvas
 
 %changelog
+* Mon Nov 12 2007 Matthias Clasen <mclasen at redhat.com> 2.20.1-2
+- Readd the scrolling patch, with an extra fix for redraw problems
+
 * Mon Oct 15 2007 Matthias Clasen <mclasen at redhat.com> 2.20.1-1
 - Update to 2.20.1 (translation updates)
 




More information about the fedora-extras-commits mailing list