diff options
Diffstat (limited to 'tutorius/actions.py')
-rw-r--r-- | tutorius/actions.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tutorius/actions.py b/tutorius/actions.py index f6f3338..ed348d9 100644 --- a/tutorius/actions.py +++ b/tutorius/actions.py @@ -72,7 +72,9 @@ class DragWrapper(object): depth = 24 # Should be set dynamically if hasattr(self._widget, 'draw_with_context'): - px = gtk.gdk.Pixmap(None, width, height, depth) # source, size, colors + # Use widget window to create drawable so we are sure to have + # the same colormap when it is drawn. + px = gtk.gdk.Pixmap(self._widget.window, width, height) ctxt = px.cairo_create() # Compensate when drawing the icon for the context # translation done to the position occupied by the widget |