Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar/graphics/palette.py
diff options
context:
space:
mode:
Diffstat (limited to 'sugar/graphics/palette.py')
-rw-r--r--sugar/graphics/palette.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/sugar/graphics/palette.py b/sugar/graphics/palette.py
index 26e651c..4c52421 100644
--- a/sugar/graphics/palette.py
+++ b/sugar/graphics/palette.py
@@ -637,11 +637,11 @@ class CanvasInvoker(Invoker):
context = self._item.get_context()
if context:
x, y = context.translate_to_screen(self._item)
-
- width, height = self._item.get_allocation()
-
- return gtk.gdk.Rectangle(x, y, width, height)
-
+ width, height = self._item.get_allocation()
+ return gtk.gdk.Rectangle(x, y, width, height)
+ else:
+ return gtk.gdk.Rectangle()
+
def _motion_notify_event_cb(self, button, event):
if event.detail == hippo.MOTION_DETAIL_ENTER:
self.emit('mouse-enter')