--- a/tuikit/core/container.py Wed Sep 03 08:57:06 2014 +0200
+++ b/tuikit/core/container.py Wed Sep 03 08:57:24 2014 +0200
@@ -1,5 +1,5 @@
from tuikit.core.widget import Widget
-from tuikit.core.coords import Point
+from tuikit.core.coords import Point, Rect
from tuikit.layouts.fixed import FixedLayout
@@ -57,11 +57,13 @@
"""
if self.focus_child:
cursor = self.focus_child.cursor
- if cursor is not None:
- return cursor.moved(*self.focus_child.pos)
+ if not cursor:
+ return None
+ cursor = cursor.moved(*self.focus_child.pos)
else:
- if self._cursor in Rect._make((0, 0), self._size):
- return self._cursor
+ cursor = self._cursor.immutable()
+ if cursor in Rect._make((0, 0), self._size):
+ return cursor
## input events ##