From 776b76b743273878700e5f5fc406045b65dfcf88 Mon Sep 17 00:00:00 2001 From: Daniel Drake Date: Sun, 11 Dec 2011 22:29:08 +0000 Subject: de-hippofy palettewindow --- 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() -- cgit v0.9.1