aboutsummaryrefslogtreecommitdiff
path: root/dw/oofawarewidget.cc
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2014-10-25 13:58:18 +0200
committerSebastian Geerken <devnull@localhost>2014-10-25 13:58:18 +0200
commitb93f16f2d770309eb49d9a3275a42e294a164f1a (patch)
tree9ca970199824b59bcb1aeea2bbd9cf75f1ff9bd8 /dw/oofawarewidget.cc
parentdcf6e00e9b790e0868d8863f140567eef5e540c1 (diff)
Fixed problems with getWidgetAtPoint.
Diffstat (limited to 'dw/oofawarewidget.cc')
-rw-r--r--dw/oofawarewidget.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/dw/oofawarewidget.cc b/dw/oofawarewidget.cc
index c31aa83a..2c7afd1f 100644
--- a/dw/oofawarewidget.cc
+++ b/dw/oofawarewidget.cc
@@ -532,6 +532,24 @@ Widget *OOFAwareWidget::getWidgetAtPoint (int x, int y,
// Continue with the current state of "iterator".
*interruptedWidget = NULL;
DBG_OBJ_MSG ("events", 1, "done with interruption");
+
+ // The interrupted widget may have returned non-NULL. In this
+ // case, the stack must be cleaned up explicitly, which would
+ // otherwise be done implicitly during the further search.
+ // (Since drawing is never quit completely, this problem only
+ // applies to searching.)
+ if (widgetAtPoint) {
+ iteratorStack->cleanup ();
+
+ DBG_IF_RTFL {
+ StringBuffer sb;
+ iteratorStack->intoStringBuffer (&sb);
+ DBG_OBJ_MSGF ("events", 2,
+ "iteratorStack after cleanup: %s",
+ sb.getChars ());
+ }
+ }
+
}
} else {
OOFStackingIterator* osi =