diff options
author | Sebastian Geerken <devnull@localhost> | 2015-01-23 23:20:59 +0100 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2015-01-23 23:20:59 +0100 |
commit | cf581248257b88e98fa4315525a0ee531b4cb9c8 (patch) | |
tree | 73ecec5922d6ae58de09fb32ad4636cd6dedab17 /dw/oofpositionedmgr.cc | |
parent | e497d315b87a42184dce3f9b90e495b3a3806b14 (diff) |
Same simplifications for Widget::getWidgetAtPoint as for Widget::draw before.
Diffstat (limited to 'dw/oofpositionedmgr.cc')
-rw-r--r-- | dw/oofpositionedmgr.cc | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/dw/oofpositionedmgr.cc b/dw/oofpositionedmgr.cc index 10c48b1e..661c5bb9 100644 --- a/dw/oofpositionedmgr.cc +++ b/dw/oofpositionedmgr.cc @@ -287,32 +287,23 @@ void OOFPositionedMgr::markExtremesChange (int ref) } Widget *OOFPositionedMgr::getWidgetAtPoint (int x, int y, - StackingIteratorStack - *iteratorStack, - Widget **interruptedWidget, - int *index) + GettingWidgetAtPointContext + *context) { DBG_OBJ_ENTER ("events", 0, "getWidgetAtPoint", "%d, %d", x, y); Widget *widgetAtPoint = NULL; - OOFAwareWidget::OOFStackingIterator *osi = - (OOFAwareWidget::OOFStackingIterator*)iteratorStack->getTop (); - while (widgetAtPoint == NULL && *interruptedWidget == NULL && *index >= 0) { - Widget *childWidget = children->get(*index)->widget; - if (!osi->hasWidgetBeenDrawnAfterInterruption (childWidget) && + for (int i = children->size() - 1; widgetAtPoint == NULL && i >= 0; i--) { + Widget *childWidget = children->get(i)->widget; + if (!context->hasWidgetBeenProcessedAsInterruption (childWidget) && !StackingContextMgr::handledByStackingContextMgr (childWidget)) - widgetAtPoint = - childWidget->getWidgetAtPointTotal (x, y, iteratorStack, - interruptedWidget); - - if (*interruptedWidget == NULL) - (*index)--; + widgetAtPoint = childWidget->getWidgetAtPoint (x, y, context); } - DBG_OBJ_MSGF ("events", 0, "=> %p (i: %p)", - widgetAtPoint, *interruptedWidget); + DBG_OBJ_MSGF ("events", 0, "=> %p", widgetAtPoint); DBG_OBJ_LEAVE (); + return widgetAtPoint; } |