diff options
author | Simon Poirier <simpoir@gmail.com> | 2009-12-08 04:36:33 (GMT) |
---|---|---|
committer | Simon Poirier <simpoir@gmail.com> | 2009-12-08 04:36:33 (GMT) |
commit | d163f14aa8f76acfe7dff430adcd4691d144936c (patch) | |
tree | 54c8285142a287c996aa7e68089839aeee27d8b6 | |
parent | 64836f57dd3ab59f03ee7c5e375caff4019791f0 (diff) |
fix colormap error on drag icon
-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 |