Commit in reactos/subsys/win32k/ntuser on MAIN
window.c+13-21.255 -> 1.256
unmark dirty windows on destruction so no painting messages get generated afterwards

reactos/subsys/win32k/ntuser
window.c 1.255 -> 1.256
diff -u -r1.255 -r1.256
--- window.c	12 Dec 2004 23:08:11 -0000	1.255
+++ window.c	12 Dec 2004 23:42:35 -0000	1.256
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: window.c,v 1.255 2004/12/12 23:08:11 navaraf Exp $
+/* $Id: window.c,v 1.256 2004/12/12 23:42:35 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -264,7 +264,7 @@
   HWND *ChildHandle;
   PWINDOW_OBJECT Child;
   PMENU_OBJECT Menu;
-  BOOL BelongsToThreadData;
+  BOOLEAN BelongsToThreadData;
   
   ASSERT(Window);
 
@@ -284,6 +284,17 @@
      in IntDestroyWindow() */
   RemoveEntryList(&Window->ThreadListEntry);
   IntUnLockThreadWindows(Window->OwnerThread->Tcb.Win32Thread);
+
+  if (Window->UpdateRegion != NULL ||
+      Window->Flags & WINDOWOBJECT_NEED_INTERNALPAINT)
+  {
+     MsqDecPaintCountQueue(Window->MessageQueue);
+  }
+
+  if (Window->Flags & WINDOWOBJECT_NEED_NCPAINT)
+  {
+     MsqDecPaintCountQueue(Window->MessageQueue);
+  }
   
   BelongsToThreadData = IntWndBelongsToThread(Window, ThreadData);
   
CVSspam 0.2.8