remove window update lock
Modified: trunk/reactos/subsys/win32k/include/painting.h
Modified: trunk/reactos/subsys/win32k/include/window.h
Modified: trunk/reactos/subsys/win32k/ntuser/painting.c
Modified: trunk/reactos/subsys/win32k/ntuser/window.c

Modified: trunk/reactos/subsys/win32k/include/painting.h
--- trunk/reactos/subsys/win32k/include/painting.h	2005-09-05 23:11:41 UTC (rev 17685)
+++ trunk/reactos/subsys/win32k/include/painting.h	2005-09-06 00:34:23 UTC (rev 17686)
@@ -12,13 +12,5 @@
 BOOL FASTCALL
 IntGetPaintMessage(HWND hWnd, UINT MsgFilterMin, UINT MsgFilterMax, PW32THREAD Thread,
                    MSG *Message, BOOL Remove);
-//BOOL STDCALL
-//NtUserValidateRgn(HWND hWnd, HRGN hRgn);
 
-#define IntLockWindowUpdate(Window) \
-  ExAcquireFastMutex(&Window->UpdateLock)
-
-#define IntUnLockWindowUpdate(Window) \
-  ExReleaseFastMutex(&Window->UpdateLock)
-
 #endif /* _WIN32K_PAINTING_H */

Modified: trunk/reactos/subsys/win32k/include/window.h
--- trunk/reactos/subsys/win32k/include/window.h	2005-09-05 23:11:41 UTC (rev 17685)
+++ trunk/reactos/subsys/win32k/include/window.h	2005-09-06 00:34:23 UTC (rev 17686)
@@ -63,8 +63,6 @@
   HANDLE NCUpdateRegion;
   /* Handle of the window region. */
   HANDLE WindowRegion;
-  /* Lock to be held when manipulating (NC)UpdateRegion */
-  FAST_MUTEX UpdateLock;
   /* Pointer to the owning thread's message queue. */
   PUSER_MESSAGE_QUEUE MessageQueue;
   struct _WINDOW_OBJECT* FirstChild;

Modified: trunk/reactos/subsys/win32k/ntuser/painting.c
--- trunk/reactos/subsys/win32k/ntuser/painting.c	2005-09-05 23:11:41 UTC (rev 17685)
+++ trunk/reactos/subsys/win32k/ntuser/painting.c	2005-09-06 00:34:23 UTC (rev 17686)
@@ -48,7 +48,6 @@
    {
       if (!(ParentWindow->Style & WS_CLIPCHILDREN))
       {
-         IntLockWindowUpdate(ParentWindow);
          if (ParentWindow->UpdateRegion != 0)
          {
             INT OffsetX, OffsetY;
@@ -65,7 +64,6 @@
             /* FIXME: If the resulting region is empty, remove fake posted paint message */
             NtGdiOffsetRgn(ValidRegion, -OffsetX, -OffsetY);
          }
-         IntUnLockWindowUpdate(ParentWindow);
       }
       OldWindow = ParentWindow;
       ParentWindow = IntGetParentObject(ParentWindow);
@@ -90,7 +88,6 @@
     {
       if (Window->Flags & WINDOWOBJECT_NEED_NCPAINT)
         {
-          IntLockWindowUpdate(Window);
           if (Window->NCUpdateRegion)
             {
               IntValidateParent(Window, Window->NCUpdateRegion);
@@ -103,7 +100,6 @@
           Window->NCUpdateRegion = NULL;
           Window->Flags &= ~WINDOWOBJECT_NEED_NCPAINT;
           MsqDecPaintCountQueue(Window->MessageQueue);
-          IntUnLockWindowUpdate(Window);
           co_IntSendMessage(hWnd, WM_NCPAINT, (WPARAM)TempRegion, 0);
           if ((HANDLE) 1 != TempRegion && NULL != TempRegion)
             {
@@ -198,12 +194,10 @@
     * Clip the given region with window rectangle (or region)
     */
 
-   IntLockWindowUpdate(Window);
    if (!Window->WindowRegion || (Window->Style & WS_MINIMIZE))
    {
       HRGN hRgnWindow;
 
-      IntUnLockWindowUpdate(Window);
       hRgnWindow = UnsafeIntCreateRectRgnIndirect(&Window->WindowRect);
       NtGdiOffsetRgn(hRgnWindow,
          -Window->WindowRect.left,
@@ -214,14 +208,12 @@
    else
    {
       RgnType = NtGdiCombineRgn(hRgn, hRgn, Window->WindowRegion, RGN_AND);
-      IntUnLockWindowUpdate(Window);
    }
 
    /*
     * Save current state of pending updates
     */
 
-   IntLockWindowUpdate(Window);
    HadPaintMessage = Window->UpdateRegion != NULL ||
       Window->Flags & WINDOWOBJECT_NEED_INTERNALPAINT;
    HadNCPaintMessage = Window->Flags & WINDOWOBJECT_NEED_NCPAINT;
@@ -401,7 +393,6 @@
          MsqIncPaintCountQueue(Window->MessageQueue);
    }
 
-   IntUnLockWindowUpdate(Window);
 }
 
 /*
@@ -735,7 +726,6 @@
       RETURN( NULL);
    }
 
-   IntLockWindowUpdate(Window);
    if (Window->UpdateRegion != NULL)
    {
       MsqDecPaintCountQueue(Window->MessageQueue);
@@ -764,7 +754,6 @@
       IntGetClientRect(Window, &Ps.rcPaint);
    }
    Window->Flags &= ~WINDOWOBJECT_NEED_INTERNALPAINT;
-   IntUnLockWindowUpdate(Window);
 
    if (Window->Flags & WINDOWOBJECT_NEED_ERASEBKGND)
    {
@@ -910,7 +899,6 @@
       return ERROR;
    }
 
-   IntLockWindowUpdate(Window);
    if (Window->UpdateRegion == NULL)
    {
       RegionType = (NtGdiSetRectRgn(hRgn, 0, 0, 0, 0) ? NULLREGION : ERROR);
@@ -923,7 +911,6 @@
          Window->WindowRect.left - Window->ClientRect.left,
          Window->WindowRect.top - Window->ClientRect.top);
    }
-   IntUnLockWindowUpdate(Window);
 
    if (bErase && RegionType != NULLREGION && RegionType != ERROR)
    {
@@ -984,7 +971,6 @@
       RETURN( ERROR);
    }
 
-   IntLockWindowUpdate(Window);
    if (Window->UpdateRegion == NULL)
    {
       Rect.left = Rect.top = Rect.right = Rect.bottom = 0;
@@ -999,7 +985,6 @@
    }
    AlwaysPaint = (Window->Flags & WINDOWOBJECT_NEED_NCPAINT) ||
                  (Window->Flags & WINDOWOBJECT_NEED_INTERNALPAINT);
-   IntUnLockWindowUpdate(Window);
 
    if (bErase && Rect.left < Rect.right && Rect.top < Rect.bottom)
    {

Modified: trunk/reactos/subsys/win32k/ntuser/window.c
--- trunk/reactos/subsys/win32k/ntuser/window.c	2005-09-05 23:11:41 UTC (rev 17685)
+++ trunk/reactos/subsys/win32k/ntuser/window.c	2005-09-06 00:34:23 UTC (rev 17686)
@@ -1578,7 +1578,6 @@
     }
 
   InitializeListHead(&WindowObject->PropListHead);
-  ExInitializeFastMutex(&WindowObject->UpdateLock);
   InitializeListHead(&WindowObject->WndObjListHead);
   ExInitializeFastMutex(&WindowObject->WndObjListLock);