Author: jimtabor
Date: Mon Feb 28 16:45:57 2011
New Revision: 50936

URL: http://svn.reactos.org/svn/reactos?rev=50936&view=rev
Log:
[Win32k|User32]
- Use User32 GetWindowRgnBox, still passing both wine msg SetWindowRgn and win 
winregion tests, see bug 5959.

Modified:
    trunk/reactos/dll/win32/user32/windows/paint.c
    trunk/reactos/include/reactos/win32k/ntuser.h
    trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c
    trunk/reactos/subsystems/win32/win32k/ntuser/window.c

Modified: trunk/reactos/dll/win32/user32/windows/paint.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/paint.c?rev=50936&r1=50935&r2=50936&view=diff
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/paint.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/paint.c [iso-8859-1] Mon Feb 28 
16:45:57 2011
@@ -278,9 +278,9 @@
 
   pWnd = ValidateHwnd(hWnd);
 
-  if (!pWnd) // || !pWnd->hrgnClip || pWnd->state2 & 
WNDS2_MAXIMIZEDMONITORREGION)
-     return ERROR;
-/*
+  if (!pWnd || !pWnd->hrgnClip || pWnd->state2 & WNDS2_MAXIMIZEDMONITORREGION)
+     return ERROR;
+
   Ret = CombineRgn(hRgn, pWnd->hrgnClip, NULL, RGN_COPY);
 
   if (!Ret)
@@ -291,8 +291,6 @@
 
   if (pWnd->ExStyle & WS_EX_LAYOUTRTL)
      MirrorRgn(hWnd, hRgn);
-*/
-  Ret = (int)NtUserCallTwoParam((DWORD_PTR)hWnd, (DWORD_PTR)hRgn, 
TWOPARAM_ROUTINE_GETWINDOWRGN);
 
   return Ret;
 }

Modified: trunk/reactos/include/reactos/win32k/ntuser.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntuser.h?rev=50936&r1=50935&r2=50936&view=diff
==============================================================================
--- trunk/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] Mon Feb 28 
16:45:57 2011
@@ -3130,7 +3130,6 @@
 #define ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING 0xfffe000d
 #define ONEPARAM_ROUTINE_GETDESKTOPMAPPING    0xfffe000e
 #define ONEPARAM_ROUTINE_GETCURSORPOSITION    0xfffe0048 // use ONEPARAM_ or 
TWOPARAM routine ?
-#define TWOPARAM_ROUTINE_GETWINDOWRGN       0xfffd0049 // user mode
 #define TWOPARAM_ROUTINE_SETMENUBARHEIGHT   0xfffd0050
 #define TWOPARAM_ROUTINE_SETGUITHRDHANDLE   0xfffd0052
   #define MSQ_STATE_CAPTURE    0x1

Modified: trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c?rev=50936&r1=50935&r2=50936&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c [iso-8859-1] 
(original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c [iso-8859-1] Mon 
Feb 28 16:45:57 2011
@@ -375,13 +375,6 @@
 
    switch(Routine)
    {
-      case TWOPARAM_ROUTINE_GETWINDOWRGN:
-         {
-            Window = UserGetWindowObject((HWND)Param1);
-            if (!Window) RETURN(ERROR);
-
-            RETURN( (DWORD_PTR)IntGetWindowRgn(Window, (HRGN)Param2));
-         }
       case TWOPARAM_ROUTINE_SETMENUBARHEIGHT:
          {
             DWORD_PTR Ret;

Modified: trunk/reactos/subsystems/win32/win32k/ntuser/window.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntuser/window.c?rev=50936&r1=50935&r2=50936&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/window.c [iso-8859-1] 
(original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/window.c [iso-8859-1] Mon Feb 
28 16:45:57 2011
@@ -4016,46 +4016,6 @@
    END_CLEANUP;
 }
 
-
-// This should be in user32!
-INT FASTCALL
-IntGetWindowRgn(PWND Window, HRGN hRgn)
-{
-   INT Ret;
-   HRGN VisRgn;
-   ROSRGNDATA *pRgn;
-
-   if(!Window)
-   {
-      return ERROR;
-   }
-   if(!hRgn)
-   {
-      return ERROR;
-   }
-
-   /* Create a new window region using the window rectangle */
-   VisRgn = IntSysCreateRectRgnIndirect(&Window->rcWindow);
-   NtGdiOffsetRgn(VisRgn, -Window->rcWindow.left, -Window->rcWindow.top);
-   /* if there's a region assigned to the window, combine them both */
-   if(Window->hrgnClip && !(Window->style & WS_MINIMIZE))
-      NtGdiCombineRgn(VisRgn, VisRgn, Window->hrgnClip, RGN_AND);
-   /* Copy the region into hRgn */
-   NtGdiCombineRgn(hRgn, VisRgn, NULL, RGN_COPY);
-
-   if((pRgn = RGNOBJAPI_Lock(hRgn, NULL)))
-   {
-      Ret = REGION_Complexity(pRgn);
-      RGNOBJAPI_Unlock(pRgn);
-   }
-   else
-      Ret = ERROR;
-
-   REGION_FreeRgnByHandle(VisRgn);
-
-   return Ret;
-}
-
 /*
  * @implemented
  */
@@ -4084,9 +4044,6 @@
       if (GDIOBJ_ValidateHandle(hRgn, GDI_OBJECT_TYPE_REGION))
       {
          hrgnCopy = IntSysCreateRectRgn(0, 0, 0, 0);
-
-         /* Set public ownership */
-         IntGdiSetRegionOwner(hrgnCopy, GDI_OBJ_HMGR_PUBLIC);
 
          NtGdiCombineRgn(hrgnCopy, hRgn, 0, RGN_COPY);
       }


Reply via email to