diff --git a/src/wxwindow/src/msw/wx_frame.cxx b/src/wxwindow/src/msw/wx_frame.cxx index a8176ad106..966e06a9fd 100644 --- a/src/wxwindow/src/msw/wx_frame.cxx +++ b/src/wxwindow/src/msw/wx_frame.cxx @@ -276,9 +276,17 @@ void wxFrame::GetPosition(int *x, int *y) parent = GetParent(); - GetWindowRect(GetHWND(), &rect); - point.x = rect.left; - point.y = rect.top; + if (::IsIconic(hwnd)) { + WINDOWPLACEMENT wp; + wp.length = sizeof(wp); + GetWindowPlacement(hwnd, &wp); + point.x = wp.rcNormalPosition.left; + point.y = wp.rcNormalPosition.top; + } else { + GetWindowRect(GetHWND(), &rect); + point.x = rect.left; + point.y = rect.top; + } // Since we now have the absolute screen coords, // if there's a parent we must subtract its top left corner