gdk: Use the correct surface size when creating surfaces

Previously we used the size of the csw window, which could easily be
huge and cause CAIRO_SURFACE_INVALID_SIZE errors. If we use the real
size, we work around this problem. The surface can now potentially be
bigger than before but we should handle that when clipping in csw.

https://bugzilla.gnome.org/show_bug.cgi?id=633701
This commit is contained in:
Benjamin Otte 2010-11-08 16:14:14 -05:00
parent 1050485a13
commit bf395263b2

View File

@ -5139,10 +5139,7 @@ gdk_window_ref_cairo_surface (GdkDrawable *drawable)
int width, height;
GdkDrawable *source;
/* 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 (private->impl_window, &width, &height);
source = _gdk_drawable_get_source_drawable (drawable);