summaryrefslogtreecommitdiff
path: root/dw/oofawarewidget.cc
diff options
context:
space:
mode:
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 =