From a08c0ea1daffe89197def9026e4c6af037ea05bb Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 5 Mar 2014 13:12:18 -0500 Subject: [PATCH] manually revert change to canvas expose handling in fee026c5ef7107d5d594159f5ece5917041591f7 Breaking out the rectangles implies a z-axis ordering of drawing,because the rect drawn last will implicitly be "on top". But redraw areas are not submitted with any z-axis information, and so drawing like this breaks canvas layering. It would be more efficient to draw the rects separately, but we don't have any ordering information and so we cannot do it correctly. --- libs/canvas/canvas.cc | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/libs/canvas/canvas.cc b/libs/canvas/canvas.cc index 72ad4ab035..8ad608ea5e 100644 --- a/libs/canvas/canvas.cc +++ b/libs/canvas/canvas.cc @@ -607,21 +607,7 @@ bool GtkCanvas::on_expose_event (GdkEventExpose* ev) { Cairo::RefPtr cairo_context = get_window()->create_cairo_context (); - - /* break into regions */ - - GdkRectangle *rects; - gint n_rects; - - gdk_region_get_rectangles (ev->region, &rects, &n_rects); - - for (gint i = 0; i < n_rects; ++i) { - Rect area (rects[i].x, rects[i].y, rects[i].x + rects[i].width, rects[i].y + rects[i].height); - render (area, cairo_context); - } - - g_free (rects); - + render (Rect (ev->area.x, ev->area.y, ev->area.x + ev->area.width, ev->area.y + ev->area.height), cairo_context); return true; }