X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77ffb5937e89927b621128789401db8921fe580f..b65ee6fd83eb16afccc00c9ba66cd0d267fe7508:/src/os2/window.cpp?ds=inline diff --git a/src/os2/window.cpp b/src/os2/window.cpp index 46e620cf1d..449a0e7dd8 100644 --- a/src/os2/window.cpp +++ b/src/os2/window.cpp @@ -5,7 +5,7 @@ // Created: 10/12/99 // RCS-ID: $Id$ // Copyright: (c) David Webster -// Licence: wxWidgets licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // @@ -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