don't offset the position for toplevel windows in wxFindWindowAtPoint() (patch 1491559)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39406 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1057,7 +1057,7 @@ wxWindow* wxFindWindowAtPoint(wxWindow* win, const wxPoint& pt)
|
|||||||
|
|
||||||
wxPoint pos = win->GetPosition();
|
wxPoint pos = win->GetPosition();
|
||||||
wxSize sz = win->GetSize();
|
wxSize sz = win->GetSize();
|
||||||
if (win->GetParent())
|
if ( !win->IsTopLeven() && win->GetParent() )
|
||||||
{
|
{
|
||||||
pos = win->GetParent()->ClientToScreen(pos);
|
pos = win->GetParent()->ClientToScreen(pos);
|
||||||
}
|
}
|
||||||
@@ -1065,7 +1065,7 @@ wxWindow* wxFindWindowAtPoint(wxWindow* win, const wxPoint& pt)
|
|||||||
wxRect rect(pos, sz);
|
wxRect rect(pos, sz);
|
||||||
if (rect.Inside(pt))
|
if (rect.Inside(pt))
|
||||||
return win;
|
return win;
|
||||||
else
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user