]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/popupcmn.cpp
Fix tracking rectangles in 64-bit build by remembering the tag as the 64-bit integer...
[wxWidgets.git] / src / common / popupcmn.cpp
index 8fc32bcc50f56547bc0b65627b54a40e9c64d543..57ba86c0a00314f91dbcd0111c7fbdc282a7b5da 100644 (file)
@@ -151,7 +151,18 @@ void wxPopupWindowBase::Position(const wxPoint& ptOrigin,
     }
 
     // now check left/right too
-    wxCoord x = ptOrigin.x + size.x;
+    wxCoord x = ptOrigin.x;
+            
+    if ( wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft )
+    {
+        // shift the window to the left instead of the right.
+        x -= size.x;
+        x -= sizeSelf.x;        // also shift it by window width.
+    }
+    else
+        x += size.x;
+
+    
     if ( x + sizeSelf.x > sizeScreen.x )
     {
         // check if there is enough space to the left