Module: wine Branch: master Commit: 406f5b2545d553b36d370a913a8454078797b097 URL: http://source.winehq.org/git/wine.git/?a=commit;h=406f5b2545d553b36d370a913a...
Author: Alexandre Julliard julliard@winehq.org Date: Tue Jul 22 15:31:04 2008 +0200
user32: Fix MapWindowPoints behavior in the process that owns the desktop window.
---
dlls/user32/painting.c | 2 ++ dlls/user32/winpos.c | 14 ++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/dlls/user32/painting.c b/dlls/user32/painting.c index 436bd16..65f708e 100644 --- a/dlls/user32/painting.c +++ b/dlls/user32/painting.c @@ -623,6 +623,8 @@ static HRGN send_ncpaint( HWND hwnd, HWND *child, UINT *flags )
if (child) hwnd = *child;
+ if (hwnd == GetDesktopWindow()) return whole_rgn; + if (whole_rgn) { RECT client, update; diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c index acfd481..a05b5f7 100644 --- a/dlls/user32/winpos.c +++ b/dlls/user32/winpos.c @@ -434,8 +434,11 @@ static void WINPOS_GetWinOffset( HWND hwndFrom, HWND hwndTo, POINT *offset ) } if (wndPtr == WND_DESKTOP) break; if (wndPtr == WND_OTHER_PROCESS) goto other_process; - offset->x += wndPtr->rectClient.left; - offset->y += wndPtr->rectClient.top; + if (wndPtr->parent) + { + offset->x += wndPtr->rectClient.left; + offset->y += wndPtr->rectClient.top; + } hwnd = wndPtr->parent; WIN_ReleasePtr( wndPtr ); } @@ -455,8 +458,11 @@ static void WINPOS_GetWinOffset( HWND hwndFrom, HWND hwndTo, POINT *offset ) } if (wndPtr == WND_DESKTOP) break; if (wndPtr == WND_OTHER_PROCESS) goto other_process; - offset->x -= wndPtr->rectClient.left; - offset->y -= wndPtr->rectClient.top; + if (wndPtr->parent) + { + offset->x -= wndPtr->rectClient.left; + offset->y -= wndPtr->rectClient.top; + } hwnd = wndPtr->parent; WIN_ReleasePtr( wndPtr ); }