[vte/vte-next: 30/47] Replace gdk_region_get_rectangles



commit 408027dda4a7ca749f899f738af303b2dd9a7995
Author: Christian Persch <chpe gnome org>
Date:   Mon May 2 22:16:47 2011 +0200

    Replace gdk_region_get_rectangles

 src/vte.c |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/src/vte.c b/src/vte.c
index 14761d2..086189c 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -10622,7 +10622,12 @@ vte_terminal_paint(GtkWidget *widget, cairo_region_t *region)
 	{
 		cairo_rectangle_int_t *rectangles;
 		gint n, n_rectangles;
-		gdk_region_get_rectangles (region, &rectangles, &n_rectangles);
+                n_rectangles = cairo_region_num_rectangles (region);
+                rectangles = g_new (cairo_rectangle_int_t, n_rectangles);
+                for (n = 0; n < n_rectangles; n++) {
+                        cairo_region_get_rectangle (region, n, &rectangles[n]);
+                }
+
 		/* don't bother to enlarge an invalidate all */
 		if (!(n_rectangles == 1
 		      && rectangles[0].width == allocation.width
@@ -10631,9 +10636,14 @@ vte_terminal_paint(GtkWidget *widget, cairo_region_t *region)
 			/* convert pixels into whole cells */
 			for (n = 0; n < n_rectangles; n++) {
 				vte_terminal_expand_region (terminal, rr, rectangles + n);
-			}
-			g_free (rectangles);
-			gdk_region_get_rectangles (rr, &rectangles, &n_rectangles);
+                        }
+                        g_free (rectangles);
+
+                        n_rectangles = cairo_region_num_rectangles (rr);
+                        rectangles = g_new (cairo_rectangle_int_t, n_rectangles);
+                        for (n = 0; n < n_rectangles; n++) {
+                                cairo_region_get_rectangle (rr, n, &rectangles[n]);
+                        }
 			cairo_region_destroy (rr);
 		}
 



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