Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/sugar3/graphics/palettewindow.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/sugar3/graphics/palettewindow.py b/src/sugar3/graphics/palettewindow.py
index 86c1611..8db0760 100644
--- a/src/sugar3/graphics/palettewindow.py
+++ b/src/sugar3/graphics/palettewindow.py
@@ -1105,13 +1105,13 @@ class CanvasInvoker(Invoker):
return self.AT_CURSOR
def get_rect(self):
- context = self._item.get_context()
- if context:
- x, y = context.translate_to_screen(self._item)
- width, height = self._item.get_allocation()
- return (x, y, width, height)
- else:
- return ()
+ window = self._item.get_window()
+ allocation = self._item.get_allocation()
+ rect = Gdk.Rectangle()
+ rect.x, rect.y = window.get_root_coords(allocation.x, allocation.y)
+ rect.width = allocation.width
+ rect.height = allocation.height
+ return rect
def __enter_notify_event_cb(self, button, event):
self.notify_mouse_enter()