]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/window.cpp
Wrappers for *ToText
[wxWidgets.git] / src / os2 / window.cpp
index 46e620cf1d100d88ea70fab9ae5aee7830e635d7..0c448ce6f5a53462b371a0857d4a20e1ad11ef47 100644 (file)
@@ -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