]> Pileus Git - ~andy/gtk/commitdiff
Fix cairo rendering on large subwindows
authorAlexander Larsson <alexl@redhat.com>
Fri, 24 Jul 2009 19:41:37 +0000 (21:41 +0200)
committerAlexander Larsson <alexl@redhat.com>
Fri, 24 Jul 2009 19:44:57 +0000 (21:44 +0200)
We get the real pixmap size and use as cairo surface size rather
than doing some magic to try to get clipping on the right hand size
(and the magic looks wrong anyway).

The previous code could result in the width/height being to big for
the cairo 28.4 fix point size and thus not drawing anything.

This fixes bug #588076.

gdk/gdkwindow.c

index 374a69c3a2003b425ec828d1499df560d6fe3fc3..754bf6e00f2416f08f7cecc65a405161f2445032 100644 (file)
@@ -2501,13 +2501,8 @@ gdk_window_begin_paint_region (GdkWindow       *window,
       paint->x_offset = -private->abs_x + implicit_paint->x_offset;
       paint->y_offset = -private->abs_y + implicit_paint->y_offset;
 
-      /* It would be nice if we had some cairo support here so we
-        could set the clip rect on the cairo surface */
-      width = private->abs_x + private->width;
-      height = private->abs_y + private->height;
-
+      gdk_drawable_get_size (paint->pixmap, &width, &height);
       paint->surface = _gdk_drawable_create_cairo_surface (paint->pixmap, width, height);
-
     }
   else
     {