[gtk+/gtk-2-24] gdk: Use the correct surface size when creating surfaces



commit bf395263b289b7b6c62bc3c420a5dc82cef757f6
Author: Benjamin Otte <otte redhat com>
Date:   Mon Nov 8 16:14:14 2010 -0500

    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

 gdk/gdkwindow.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 5b00e4d..654e732 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -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);
 



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