Re: [g-a-devel] patch for the gnome-mag bug 171465



Thanks Carlos;

The patch looks good. Nice work, thanks a lot for getting to the cause of these problems! I haven't been able to test it thoroughly yet, but I've reviewed it and agree with your conclusions. If you have tested it with gnopernicus let me know and I'll commit, or if you have a CVS account you can commit the patch.

regards

Bill


Carlos Eduardo Rodrigues Diogenes wrote:

Hi,

Few time ago I send a patch to the gnome-mag bug 171465 throw bugzilla, but I don't receive any feedback about it. Anyone test it? This is the right solution?

By the way, I'm sending the patch attached too.

Thanks,
Carlos.

------------------------------------------------------------------------

? magnifier.patch
Index: magnifier/zoom-region.c
===================================================================
RCS file: /cvs/gnome/gnome-mag/magnifier/zoom-region.c,v
retrieving revision 1.57
diff -u -r1.57 zoom-region.c
--- magnifier/zoom-region.c	24 Aug 2005 17:54:37 -0000	1.57
+++ magnifier/zoom-region.c	26 Nov 2005 17:38:09 -0000
@@ -1173,8 +1173,8 @@
		gdk_draw_drawable (zoom_region->priv->w->window,
				   zoom_region->priv->default_gc,
				   zoom_region->priv->pixmap,
-				   area->x + zoom_region->priv->exposed_bounds.x1,
-				   area->y + zoom_region->priv->exposed_bounds.y1,
+				   area->x + zoom_region->priv->exposed_bounds.x1 - zoom_region->priv->source_area.x1 * zoom_region->xscale,
+				   area->y + zoom_region->priv->exposed_bounds.y1 - zoom_region->priv->source_area.y1 * zoom_region->yscale,
				   area->x,
				   area->y,
				   area->width,
@@ -1727,7 +1727,7 @@
		}
		else
		{
-			Magnifier *magnifier = (Magnifier *) zoom_region->priv->parent;
+		        //Magnifier *magnifier = (Magnifier *) zoom_region->priv->parent;
			zoom_region->priv->source_drawable = gdk_screen_get_root_window (
				gdk_display_get_screen (
					magnifier->source_display,
@@ -1842,8 +1842,8 @@
				     zoom_region->priv->scaled_pixbuf,
				     0,
				     0,
-				     paint_rect.x + zoom_region->priv->exposed_bounds.x1,
-				     paint_rect.y + zoom_region->priv->exposed_bounds.y1,
+				     paint_rect.x + zoom_region->priv->exposed_bounds.x1 - zoom_region->priv->source_area.x1 * zoom_region->xscale,
+				     paint_rect.y + zoom_region->priv->exposed_bounds.y1 - zoom_region->priv->source_area.y1 * zoom_region->yscale,
				     paint_rect.width,
				     paint_rect.height,
				     GDK_RGB_DITHER_NONE,
@@ -2327,5 +2327,14 @@
if (zoom_region->priv->pixmap) g_object_unref (zoom_region->priv->pixmap);
		zoom_region_create_pixmap (zoom_region);
+		if (zoom_region->priv->scaled_pixbuf)
+		        g_object_unref (zoom_region->priv->scaled_pixbuf);
+
+ zoom_region->priv->scaled_pixbuf = + gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8,
+				  (zoom_region->priv->source_area.x2 -
+				   zoom_region->priv->source_area.x1) * zoom_region->xscale + 1,
+				  (zoom_region->priv->source_area.y2 -
+				   zoom_region->priv->source_area.y1) * zoom_region->yscale + 1);
	}
	zoom_region_queue_update (zoom_region,
				  zoom_region_source_rect_from_view_bounds (
------------------------------------------------------------------------

_______________________________________________
Gnome-accessibility-devel mailing list
Gnome-accessibility-devel gnome org
http://mail.gnome.org/mailman/listinfo/gnome-accessibility-devel




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]