Alexandre Julliard : winex11: Break positioning of graphics in mirrored contexts to be broken the same way as Windows .

Alexandre Julliard julliard at winehq.org
Thu Sep 2 12:01:23 CDT 2010


Module: wine
Branch: master
Commit: 2cca18dd6ecb65ff65e4eb9e882838eed4477777
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=2cca18dd6ecb65ff65e4eb9e882838eed4477777

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Aug  3 22:56:04 2010 +0200

winex11: Break positioning of graphics in mirrored contexts to be broken the same way as Windows.

---

 dlls/winex11.drv/graphics.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/dlls/winex11.drv/graphics.c b/dlls/winex11.drv/graphics.c
index 4c2d266..8420f01 100644
--- a/dlls/winex11.drv/graphics.c
+++ b/dlls/winex11.drv/graphics.c
@@ -82,13 +82,14 @@ static RECT get_device_rect( HDC hdc, int left, int top, int right, int bottom )
     rect.top    = top;
     rect.right  = right;
     rect.bottom = bottom;
-    LPtoDP( hdc, (POINT *)&rect, 2 );
     if (GetLayout( hdc ) & LAYOUT_RTL)
     {
-        int tmp = rect.left;
-        rect.left = rect.right + 1;
-        rect.right = tmp + 1;
+        /* shift the rectangle so that the right border is included after mirroring */
+        /* it would be more correct to do this after LPtoDP but that's not what Windows does */
+        rect.left--;
+        rect.right--;
     }
+    LPtoDP( hdc, (POINT *)&rect, 2 );
     if (rect.left > rect.right)
     {
         int tmp = rect.left;




More information about the wine-cvs mailing list