All pastes #718412 Raw Edit

Stuff

public text v1 · immutable
#718412 ·published 2007-09-28 12:14 UTC
rendered paste body
diff --git a/sugar/graphics/window.py b/sugar/graphics/window.py
index 28fdb35..c34ef23 100644
--- a/sugar/graphics/window.py
+++ b/sugar/graphics/window.py
@@ -61,8 +61,12 @@ class Window(gtk.Window):
         window = self.canvas.window
         width, height = window.get_size()
 
+        pixmap = gtk.gdk.Pixmap(window, width, height)
+        pixmap.draw_drawable(window.new_gc(), window, 0, 0, 0, 0, width, height)
+
         screenshot = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, has_alpha=False,
                                     bits_per_sample=8, width=width, height=height)
-        screenshot.get_from_drawable(window, window.get_colormap(), 0, 0, 0, 0,
+        screenshot.get_from_drawable(pixmap, pixmap.get_colormap(), 0, 0, 0, 0,
                                      width, height)
         return screenshot