find frame position correctly when minimized
svn: r3738
This commit is contained in:
parent
fb2b7fbf05
commit
efc4ea0c7f
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user