[Win32ss]

- MapWindowPoints return incorrect result for windows with WS_EX_LAYOUTRTL style.
- Patch by Maxim Andreyanov. see CORE-7947.

svn path=/trunk/; revision=62327
This commit is contained in:
James Tabor 2014-02-25 05:29:00 +00:00
parent 9b4d645ad0
commit 38758f72ac
3 changed files with 11 additions and 4 deletions

View file

@ -2313,6 +2313,17 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
ParentWindow->rcClient.top);
}
*/
/* correct child window coordinates if mirroring on parent is enabled */
if (ParentWindow != NULL)
{
if ( ((Cs->style & WS_CHILD) == WS_CHILD) &&
((ParentWindow->ExStyle & WS_EX_LAYOUTRTL) == WS_EX_LAYOUTRTL))
{
Window->rcWindow.right = ParentWindow->rcClient.right - (Window->rcWindow.left - ParentWindow->rcClient.left);
Window->rcWindow.left = Window->rcWindow.right - Size.cx;
}
}
Window->rcClient = Window->rcWindow;
/* Link the window */

View file

@ -120,8 +120,6 @@ IntMapWindowPoints(PWND FromWnd, PWND ToWnd, LPPOINT lpPoints, UINT cPoints)
Delta.y -= ToWnd->rcClient.top;
}
if (mirror_from) Delta.x = -Delta.x;
for (i = 0; i != cPoints; i++)
{
lpPoints[i].x += Delta.x;

View file

@ -218,8 +218,6 @@ MapWindowPoints(HWND hWndFrom, HWND hWndTo, LPPOINT lpPoints, UINT cPoints)
Delta.y -= ToWnd->rcClient.top;
}
if (mirror_from) Delta.x = -Delta.x;
for (i = 0; i != cPoints; i++)
{
lpPoints[i].x += Delta.x;