diff options
Diffstat (limited to 'gdk/gdkdraw.c')
-rw-r--r-- | gdk/gdkdraw.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gdk/gdkdraw.c b/gdk/gdkdraw.c index 4946596121..d05bb1b7f4 100644 --- a/gdk/gdkdraw.c +++ b/gdk/gdkdraw.c @@ -597,6 +597,10 @@ gdk_draw_glyphs (GdkDrawable *drawable, * If the X server or other windowing system backend is on the local * machine, this function may use shared memory to avoid copying * the image data. + * + * If the source drawable is a #GdkWindow and partially offscreen + * or obscured, then the obscured portions of the returned image + * will contain undefined data. * * Return value: a #GdkImage containing the contents of @drawable **/ @@ -611,6 +615,7 @@ gdk_drawable_get_image (GdkDrawable *drawable, gint composite_x_offset = 0; gint composite_y_offset = 0; GdkImage *retval; + GdkColormap *cmap; g_return_val_if_fail (GDK_IS_DRAWABLE (drawable), NULL); g_return_val_if_fail (x >= 0, NULL); @@ -639,6 +644,11 @@ gdk_drawable_get_image (GdkDrawable *drawable, g_object_unref (G_OBJECT (composite)); + cmap = gdk_drawable_get_colormap (drawable); + + if (retval && cmap) + gdk_image_set_colormap (retval, cmap); + return retval; } |