fix drag-and-drop window traversal to handle menus and other unrealized windows
svn: r16365
This commit is contained in:
parent
35f0f15722
commit
a71b5697ad
|
@ -2513,19 +2513,22 @@ wxWindow *wxWindow::FindChildByWidget(Widget w)
|
||||||
wxChildNode *node, *next;
|
wxChildNode *node, *next;
|
||||||
wxWindow *r;
|
wxWindow *r;
|
||||||
|
|
||||||
if ((w == X->frame)
|
if (X) {
|
||||||
|| (w == X->handle))
|
if ((w == X->frame)
|
||||||
return this;
|
|| (w == X->handle))
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (children) {
|
||||||
for (node = children->First(); node; node = next) {
|
for (node = children->First(); node; node = next) {
|
||||||
wxWindow *child;
|
wxWindow *child;
|
||||||
next = node->Next();
|
next = node->Next();
|
||||||
child = (wxWindow*)(node->Data());
|
child = (wxWindow*)(node->Data());
|
||||||
if (child) {
|
if (child) {
|
||||||
r = child->FindChildByWidget(w);
|
r = child->FindChildByWidget(w);
|
||||||
if (r)
|
if (r)
|
||||||
return r;
|
return r;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user