aboutsummaryrefslogtreecommitdiff
path: root/dw/oofpositionedmgr.cc
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2014-09-25 11:39:53 +0200
committerSebastian Geerken <devnull@localhost>2014-09-25 11:39:53 +0200
commita3486120edf86a0248f0162e5cae2ab7250c9848 (patch)
tree98a079b7125debaf44e62111ac64668f2e05c8a7 /dw/oofpositionedmgr.cc
parentbcebc40e56a88fac5fbdd4cc04d74d53ac6ec3ff (diff)
Some work on mouse events (getWidgetAtPoint).
Diffstat (limited to 'dw/oofpositionedmgr.cc')
-rw-r--r--dw/oofpositionedmgr.cc18
1 files changed, 11 insertions, 7 deletions
diff --git a/dw/oofpositionedmgr.cc b/dw/oofpositionedmgr.cc
index 4799ec8c..e5c31a98 100644
--- a/dw/oofpositionedmgr.cc
+++ b/dw/oofpositionedmgr.cc
@@ -226,18 +226,22 @@ void OOFPositionedMgr::markExtremesChange (int ref)
{
}
-Widget *OOFPositionedMgr::getWidgetAtPoint (int x, int y, int level)
+Widget *OOFPositionedMgr::getWidgetAtPoint (int x, int y)
{
- for (int i = 0; i < children->size(); i++) {
+ DBG_OBJ_ENTER ("events", 0, "getWidgetAtPoint", "%d, %d", x, y);
+ Widget *childAtPoint = NULL;
+
+ for (int i = 0; i < children->size() && childAtPoint == NULL; i++) {
Widget *childWidget = children->get(i)->widget;
- if (childWidget->wasAllocated ()) {
- Widget *childAtPoint = childWidget->getWidgetAtPoint (x, y, level + 1);
- if (childAtPoint)
- return childAtPoint;
+ if (!StackingContextMgr::handledByStackingContextMgr (childWidget) &&
+ childWidget->wasAllocated ()) {
+ childAtPoint = childWidget->getWidgetAtPoint (x, y);
}
}
- return NULL;
+ DBG_OBJ_MSGF ("events", 0, "=> %p", childAtPoint);
+ DBG_OBJ_LEAVE ();
+ return childAtPoint;
}
void OOFPositionedMgr::tellPosition (Widget *widget, int x, int y)