use current mouse position as default position in wxWindow::PopupMenu (works better in wxGTK and is what you need in majority of cases)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27599 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user