X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/655719367ac5e131d9642e5783f3ecf64d1a3385..13a5a49f36fee7a8afc237b2fe254a6db9663371:/src/os2/window.cpp diff --git a/src/os2/window.cpp b/src/os2/window.cpp index fb3aee34a1..791e888a4d 100644 --- a/src/os2/window.cpp +++ b/src/os2/window.cpp @@ -180,7 +180,6 @@ static wxWindow* gpWinBeingCreated = NULL; BEGIN_EVENT_TABLE(wxWindowOS2, wxWindowBase) EVT_ERASE_BACKGROUND(wxWindowOS2::OnEraseBackground) EVT_SYS_COLOUR_CHANGED(wxWindowOS2::OnSysColourChanged) - EVT_INIT_DIALOG(wxWindowOS2::OnInitDialog) EVT_IDLE(wxWindowOS2::OnIdle) EVT_SET_FOCUS(wxWindowOS2::OnSetFocus) END_EVENT_TABLE() @@ -1955,10 +1954,18 @@ bool wxWindowOS2::DoPopupMenu( pMenu->SetInvokingWindow(this); pMenu->UpdateUI(); - - DoClientToScreen( &nX - ,&nY - ); + + if ( x == -1 && y == -1 ) + { + wxPoint mouse = wxGetMousePosition(); + nX = mouse.x; nY = mouse.y; + } + else + { + DoClientToScreen( &nX + ,&nY + ); + } wxCurrentPopupMenu = pMenu; ::WinPopupMenu( hWndParent @@ -4353,7 +4360,7 @@ void wxWindowOS2::MoveChildren( ,vSwp.y - nDiff ,vSwp.cx ,vSwp.cy - ,SWP_MOVE | SWP_SHOW | SWP_ZORDER + ,SWP_MOVE ); ::WinQueryWindowPos(GetHwndOf(pWin), pWin->GetSwp()); if (pWin->IsKindOf(CLASSINFO(wxRadioBox)))