Applied patch #841324 from Ian Brown:
"GetPosition() returns wrong result for dialog" modified for better backward binary compatibility. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@24574 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1282,6 +1282,16 @@ void wxWindow::DoGetPosition(int *x, int *y) const
|
||||
CanvasGetPosition(x, y);
|
||||
return;
|
||||
}
|
||||
// hack for binary compatibility
|
||||
if (IsTopLevel())
|
||||
{
|
||||
wxDialog* dlg = wxDynamicCast(this, wxDialog);
|
||||
if (dlg)
|
||||
{
|
||||
dlg->DoGetPosition_(x, y);
|
||||
return;
|
||||
}
|
||||
}
|
||||
Widget widget = (Widget) GetTopWidget();
|
||||
Position xx, yy;
|
||||
XtVaGetValues(widget, XmNx, &xx, XmNy, &yy, NULL);
|
||||
|
||||
Reference in New Issue
Block a user