[User32]
authorJames Tabor <james.tabor@reactos.org>
Sun, 4 Sep 2011 21:54:57 +0000 (21:54 +0000)
committerJames Tabor <james.tabor@reactos.org>
Sun, 4 Sep 2011 21:54:57 +0000 (21:54 +0000)
- Fixed over check conditions for deleting regions in set window region.
- Disabled offsets with window region. Fixes wine tests..

svn path=/trunk/; revision=53595

reactos/dll/win32/user32/windows/paint.c

index 0d90f23..74e3c8a 100644 (file)
@@ -208,7 +208,7 @@ SetWindowRgn(
    if (!Hook)
    {
       Ret = NtUserSetWindowRgn(hWnd, hRgn, bRedraw);
-      if (hRgn && Ret)
+      if (Ret)
           DeleteObject(hRgn);
       return Ret;
    }
@@ -285,10 +285,10 @@ GetWindowRgn(
 
   if (!Ret)
      return ERROR;
-
+/*
   if (hWnd != GetDesktopWindow()) // pWnd->fnid != FNID_DESKTOP)
      Ret = OffsetRgn(hRgn, -pWnd->rcWindow.left, -pWnd->rcWindow.top);
-
+*/
   if (pWnd->ExStyle & WS_EX_LAYOUTRTL)
      MirrorRgn(hWnd, hRgn);
 
@@ -319,10 +319,10 @@ GetWindowRgnBox(
 
   if (!Ret)
      return ERROR;
-
+/*
   if (hWnd != GetDesktopWindow()) // pWnd->fnid != FNID_DESKTOP)
      OffsetRect(lprc, -pWnd->rcWindow.left, -pWnd->rcWindow.top);
-
+*/
   if (pWnd->ExStyle & WS_EX_LAYOUTRTL)
      MirrorWindowRect(pWnd, lprc);