Commit 2cca18dd authored by Alexandre Julliard's avatar Alexandre Julliard

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

parent cc945706
...@@ -82,13 +82,14 @@ static RECT get_device_rect( HDC hdc, int left, int top, int right, int bottom ) ...@@ -82,13 +82,14 @@ static RECT get_device_rect( HDC hdc, int left, int top, int right, int bottom )
rect.top = top; rect.top = top;
rect.right = right; rect.right = right;
rect.bottom = bottom; rect.bottom = bottom;
LPtoDP( hdc, (POINT *)&rect, 2 );
if (GetLayout( hdc ) & LAYOUT_RTL) if (GetLayout( hdc ) & LAYOUT_RTL)
{ {
int tmp = rect.left; /* shift the rectangle so that the right border is included after mirroring */
rect.left = rect.right + 1; /* it would be more correct to do this after LPtoDP but that's not what Windows does */
rect.right = tmp + 1; rect.left--;
rect.right--;
} }
LPtoDP( hdc, (POINT *)&rect, 2 );
if (rect.left > rect.right) if (rect.left > rect.right)
{ {
int tmp = rect.left; int tmp = rect.left;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment