]> git.saurik.com Git - wxWidgets.git/commitdiff
return correct coordinates for child windows from DoGetPosition() in RTL mode (patch...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 10 Sep 2006 23:42:19 +0000 (23:42 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 10 Sep 2006 23:42:19 +0000 (23:42 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41149 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/window.cpp

index 50d4d88eb767e447e56e0da4cb1aa0745cde0d6b..eb18a5e6b1d660f0d6c61e112fbef77691ecb9cf 100644 (file)
@@ -1701,6 +1701,13 @@ void wxWindowMSW::DoGetPosition(int *x, int *y) const
         // children, not for the dialogs/frames
         if ( !IsTopLevel() )
         {
+            if ( wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft )
+            {
+                // In RTL mode, we want the logical left x-coordinate, 
+                // which would be the physical right x-coordinate.
+                point.x = rect.right;
+            }
+
             // Since we now have the absolute screen coords, if there's a
             // parent we must subtract its top left corner
             if ( parent )