From 142ce1cb119cebb12db4640b568386b1cde26e13 Mon Sep 17 00:00:00 2001 From: Simon Schampijer Date: Thu, 30 Aug 2007 13:10:50 +0000 Subject: Display the rollover at 0,0 when context is empty --- (limited to 'sugar') 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') -- cgit v0.9.1