X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77ffb5937e89927b621128789401db8921fe580f..7d0cfe71cf84a7af4ea4f415964767dcb7d1dd66:/src/motif/window.cpp?ds=sidebyside diff --git a/src/motif/window.cpp b/src/motif/window.cpp index 34b1e65c38..207afc3ed0 100644 --- a/src/motif/window.cpp +++ b/src/motif/window.cpp @@ -6,7 +6,7 @@ // Created: 17/09/98 // RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: wxWidgets licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -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