Display the rollover at 0,0 when context is empty

This commit is contained in:
Simon Schampijer 2007-08-30 15:10:50 +02:00
parent e455611525
commit 142ce1cb11

View File

@ -637,10 +637,10 @@ class CanvasInvoker(Invoker):
context = self._item.get_context() context = self._item.get_context()
if context: if context:
x, y = context.translate_to_screen(self._item) x, y = context.translate_to_screen(self._item)
width, height = self._item.get_allocation() width, height = self._item.get_allocation()
return gtk.gdk.Rectangle(x, y, width, height) return gtk.gdk.Rectangle(x, y, width, height)
else:
return gtk.gdk.Rectangle()
def _motion_notify_event_cb(self, button, event): def _motion_notify_event_cb(self, button, event):
if event.detail == hippo.MOTION_DETAIL_ENTER: if event.detail == hippo.MOTION_DETAIL_ENTER: