diff options
author | Sebastian Geerken <devnull@localhost> | 2014-06-11 13:13:10 +0200 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2014-06-11 13:13:10 +0200 |
commit | 24f92f1a625dfd9631b5350a56e75205083350df (patch) | |
tree | 9aef4cb3644304e24138ac8f7ac83712a2ee485a /dw/widget.cc | |
parent | f108a0bef057ca4b8c239b99ee9efd14e5d71f37 (diff) |
'getWidgetAtPoint' is only called for allocated widgets.
Diffstat (limited to 'dw/widget.cc')
-rw-r--r-- | dw/widget.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/dw/widget.cc b/dw/widget.cc index e6c2aa76..a3d85d0a 100644 --- a/dw/widget.cc +++ b/dw/widget.cc @@ -740,9 +740,11 @@ Widget *Widget::getWidgetAtPoint (int x, int y, int level) (Content::WIDGET_IN_FLOW | Content::WIDGET_OOF_CONT), false); - while (childAtPoint == NULL && it->next ()) - childAtPoint = it->getContent()->widget->getWidgetAtPoint (x, y, - level + 1); + while (childAtPoint == NULL && it->next ()) { + Widget *child = it->getContent()->widget; + if (child->wasAllocated ()) + childAtPoint = child->getWidgetAtPoint (x, y, level + 1); + } it->unref (); |