]> git.saurik.com Git - wxWidgets.git/commitdiff
don't offset the position for toplevel windows in wxFindWindowAtPoint() (patch 1491559)
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 28 May 2006 23:47:59 +0000 (23:47 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 28 May 2006 23:47:59 +0000 (23:47 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39406 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/utilscmn.cpp

index cf07a0a5c26eb02f61c2269a9586accc928743c3..49f9dee57c571c466fa78de7c6dd5ea8973dc703 100644 (file)
@@ -1057,7 +1057,7 @@ wxWindow* wxFindWindowAtPoint(wxWindow* win, const wxPoint& pt)
 
     wxPoint pos = win->GetPosition();
     wxSize sz = win->GetSize();
-    if (win->GetParent())
+    if ( !win->IsTopLeven() && win->GetParent() )
     {
         pos = win->GetParent()->ClientToScreen(pos);
     }
@@ -1065,8 +1065,8 @@ wxWindow* wxFindWindowAtPoint(wxWindow* win, const wxPoint& pt)
     wxRect rect(pos, sz);
     if (rect.Inside(pt))
         return win;
-    else
-        return NULL;
+
+    return NULL;
 }
 
 wxWindow* wxGenericFindWindowAtPoint(const wxPoint& pt)