Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Drake <dsd@laptop.org>2011-12-11 22:29:08 (GMT)
committer Daniel Drake <dsd@laptop.org>2011-12-11 22:30:33 (GMT)
commit776b76b743273878700e5f5fc406045b65dfcf88 (patch)
tree7021cb999458829a674fe2a97b1bfd825d2a4912
parent48d540c92fc7bb21fe2a9ba68ee57ac922abe96f (diff)
de-hippofy palettewindow
-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()