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/outofflowmgr.cc | |
parent | f108a0bef057ca4b8c239b99ee9efd14e5d71f37 (diff) |
'getWidgetAtPoint' is only called for allocated widgets.
Diffstat (limited to 'dw/outofflowmgr.cc')
-rw-r--r-- | dw/outofflowmgr.cc | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/dw/outofflowmgr.cc b/dw/outofflowmgr.cc index bbfe42e0..eb5bf3e8 100644 --- a/dw/outofflowmgr.cc +++ b/dw/outofflowmgr.cc @@ -1366,10 +1366,12 @@ Widget *OutOfFlowMgr::getFloatWidgetAtPoint (SortedFloatsVector *list, for (int i = 0; i < list->size(); i++) { // Could use binary search to be faster. Float *vloat = list->get(i); - Widget *childAtPoint = - vloat->getWidget()->getWidgetAtPoint (x, y, level + 1); - if (childAtPoint) - return childAtPoint; + if (vloat->getWidget()->wasAllocated ()) { + Widget *childAtPoint = + vloat->getWidget()->getWidgetAtPoint (x, y, level + 1); + if (childAtPoint) + return childAtPoint; + } } return NULL; @@ -1380,9 +1382,12 @@ Widget *OutOfFlowMgr::getAbsolutelyPositionedWidgetAtPoint (int x, int y, { for (int i = 0; i < absolutelyPositioned->size(); i++) { AbsolutelyPositioned *abspos = absolutelyPositioned->get(i); - Widget *childAtPoint = abspos->widget->getWidgetAtPoint (x, y, level + 1); - if (childAtPoint) - return childAtPoint; + if (abspos->widget->wasAllocated ()) { + Widget *childAtPoint = + abspos->widget->getWidgetAtPoint (x, y, level + 1); + if (childAtPoint) + return childAtPoint; + } } return NULL; |