diff options
author | Reinier Heeres <reinier@heeres.eu> | 2007-11-22 16:36:03 (GMT) |
---|---|---|
committer | Reinier Heeres <reinier@heeres.eu> | 2007-11-22 16:36:03 (GMT) |
commit | e9119e57335b1a5c6758e90cc4b242c619e8b27e (patch) | |
tree | c56c56316e4e7e88452479e2f452125b9bb999c9 /lib | |
parent | acd0bec92f85b8c9ecada0c54576a9e5f24145ec (diff) |
Fix palette issue in Friends frame, part of #4515
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sugar/graphics/palette.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/sugar/graphics/palette.py b/lib/sugar/graphics/palette.py index 69dc071..a0543cb 100644 --- a/lib/sugar/graphics/palette.py +++ b/lib/sugar/graphics/palette.py @@ -611,13 +611,14 @@ class WidgetInvoker(Invoker): widget.connect('leave-notify-event', self._leave_notify_event_cb) def get_rect(self): - win_x, win_y = self._widget.window.get_origin() - rectangle = self._widget.get_allocation() - - x = win_x + rectangle.x - y = win_y + rectangle.y - width = rectangle.width - height = rectangle.height + x, y = self._widget.window.get_origin() + allocation = self._widget.get_allocation() + + if self._widget.flags() & gtk.NO_WINDOW: + x += allocation.x + y += allocation.y + width = allocation.width + height = allocation.height return gtk.gdk.Rectangle(x, y, width, height) |