X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77ffb5937e89927b621128789401db8921fe580f..31ad423e4fb556ec225a63b161154d3bf3445c1b:/src/os2/window.cpp?ds=sidebyside diff --git a/src/os2/window.cpp b/src/os2/window.cpp index 46e620cf1d..0c448ce6f5 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 ///////////////////////////////////////////////////////////////////////////// // @@ -1955,10 +1955,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