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:
@@ -1075,6 +1075,12 @@ void wxWindow::DoSetToolTip(wxToolTip * WXUNUSED(tooltip))
|
||||
|
||||
bool wxWindow::DoPopupMenu(wxMenu *menu, int x, int y)
|
||||
{
|
||||
if ( x == -1 && y == -1 )
|
||||
{
|
||||
wxPoint mouse = ScreenToClient(wxGetMousePosition());
|
||||
x = mouse.x; y = mouse.y;
|
||||
}
|
||||
|
||||
Widget widget = (Widget) GetMainWidget();
|
||||
|
||||
/* The menuId field seems to be usused, so we'll use it to
|
||||
|
Reference in New Issue
Block a user