[ros-diffs] [jimtabor] 44576: [Win32k] - Continuing the moving into WND structure with minor desktop structure changes. - Tested: wine user32 tests, AbiWord 2.6.8, FF 3.5, OOo 2.4.3 and Seamonkey 2.0.

jimtabor at svn.reactos.org jimtabor at svn.reactos.org
Mon Dec 14 07:48:40 CET 2009


Author: jimtabor
Date: Mon Dec 14 07:48:40 2009
New Revision: 44576

URL: http://svn.reactos.org/svn/reactos?rev=44576&view=rev
Log:
[Win32k]
- Continuing the moving into WND structure with minor desktop structure changes.
- Tested: wine user32 tests, AbiWord 2.6.8, FF 3.5, OOo 2.4.3 and Seamonkey 2.0.

Modified:
    trunk/reactos/subsystems/win32/win32k/include/desktop.h
    trunk/reactos/subsystems/win32/win32k/include/window.h
    trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c
    trunk/reactos/subsystems/win32/win32k/ntuser/input.c
    trunk/reactos/subsystems/win32/win32k/ntuser/message.c
    trunk/reactos/subsystems/win32/win32k/ntuser/misc.c
    trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c
    trunk/reactos/subsystems/win32/win32k/ntuser/painting.c
    trunk/reactos/subsystems/win32/win32k/ntuser/vis.c
    trunk/reactos/subsystems/win32/win32k/ntuser/window.c
    trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c

Modified: trunk/reactos/subsystems/win32/win32k/include/desktop.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/include/desktop.h?rev=44576&r1=44575&r2=44576&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/desktop.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/desktop.h [iso-8859-1] Mon Dec 14 07:48:40 2009
@@ -27,7 +27,7 @@
 
     PWIN32HEAP pheapDesktop;
     PSECTION_OBJECT DesktopHeapSection;
-    PDESKTOPINFO DesktopInfo;
+    PDESKTOPINFO pDeskInfo;
     PWND spwndMessage;
 } DESKTOP, *PDESKTOP;
 

Modified: trunk/reactos/subsystems/win32/win32k/include/window.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/include/window.h?rev=44576&r1=44575&r2=44576&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/window.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/window.h [iso-8859-1] Mon Dec 14 07:48:40 2009
@@ -27,8 +27,6 @@
 
   /* Pointer to the thread information */
   PTHREADINFO pti; // Use Wnd->head.pti
-  /* Pointer to the desktop */
-  PDESKTOPINFO Desktop;
   /* system menu handle. */
   HMENU SystemMenu;
   /* Entry in the thread's list of windows. */
@@ -36,7 +34,7 @@
   /* Handle for the window. */
   HWND hSelf;
   /* Window flags. */
-  ULONG Flags;
+  ULONG state;
   /* Handle of region of the window to be updated. */
   HANDLE UpdateRegion;
   /* Handle of the window region. */
@@ -59,7 +57,6 @@
   PWINDOW_SCROLLINFO Scroll;
   PETHREAD OwnerThread; // Use Wnd->head.pti
   HWND hWndLastPopup; /* handle to last active popup window (wine doesn't use pointer, for unk. reason)*/
-  ULONG Status;
   /* counter for tiled child windows */
   ULONG TiledCounter;
   /* WNDOBJ list */
@@ -67,14 +64,14 @@
 } WINDOW_OBJECT; /* PWINDOW_OBJECT already declared at top of file */
 
 /* Window flags. */
-#define WINDOWOBJECT_NEED_SIZE            (0x00000001) // WNDS_SENDSIZEMOVEMSGS?
-#define WINDOWOBJECT_NEED_ERASEBKGND      (0x00000002) // WNDS_ERASEBACKGROUND
-#define WINDOWOBJECT_NEED_NCPAINT         (0x00000004) // WNDS_SENDNCPAINT
-#define WINDOWOBJECT_NEED_INTERNALPAINT   (0x00000008) // WNDS_INTERNALPAINT
+#define WINDOWOBJECT_NEED_SIZE            WNDS_SENDSIZEMOVEMSGS
+#define WINDOWOBJECT_NEED_ERASEBKGND      WNDS_ERASEBACKGROUND
+#define WINDOWOBJECT_NEED_NCPAINT         WNDS_SENDNCPAINT
+#define WINDOWOBJECT_NEED_INTERNALPAINT   WNDS_INTERNALPAINT
 #define WINDOWOBJECT_RESTOREMAX           (0x00000020) // Set/Clr WS_MAXIMIZE && Clr/Set WS_EX2_VERTICALLYMAXIMIZEDLEFT/RIGHT
 
-#define WINDOWSTATUS_DESTROYING         (0x1) // WNDS2_INDESTROY
-#define WINDOWSTATUS_DESTROYED          (0x2) // WNDS_DESTROYED
+#define WINDOWSTATUS_DESTROYING         WNDS2_INDESTROY
+#define WINDOWSTATUS_DESTROYED          WNDS_DESTROYED
 
 #define HAS_DLGFRAME(Style, ExStyle) \
             (((ExStyle) & WS_EX_DLGMODALFRAME) || \

Modified: trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c?rev=44576&r1=44575&r2=44576&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c [iso-8859-1] Mon Dec 14 07:48:40 2009
@@ -1032,23 +1032,23 @@
    DesktopInfoSize = FIELD_OFFSET(DESKTOPINFO,
                                   szDesktopName[(lpszDesktopName->Length / sizeof(WCHAR)) + 1]);
 
-   DesktopObject->DesktopInfo = RtlAllocateHeap(DesktopObject->pheapDesktop,
+   DesktopObject->pDeskInfo = RtlAllocateHeap(DesktopObject->pheapDesktop,
                                                 HEAP_NO_SERIALIZE,
                                                 DesktopInfoSize);
 
-   if (DesktopObject->DesktopInfo == NULL)
+   if (DesktopObject->pDeskInfo == NULL)
    {
        ObDereferenceObject(DesktopObject);
        DPRINT1("Failed to create the DESKTOP structure!\n");
        RETURN(NULL);
    }
 
-   RtlZeroMemory(DesktopObject->DesktopInfo,
+   RtlZeroMemory(DesktopObject->pDeskInfo,
                  DesktopInfoSize);
 
-   DesktopObject->DesktopInfo->pvDesktopBase = DesktopHeapSystemBase;
-   DesktopObject->DesktopInfo->pvDesktopLimit = (PVOID)((ULONG_PTR)DesktopHeapSystemBase + HeapSize);
-   RtlCopyMemory(DesktopObject->DesktopInfo->szDesktopName,
+   DesktopObject->pDeskInfo->pvDesktopBase = DesktopHeapSystemBase;
+   DesktopObject->pDeskInfo->pvDesktopLimit = (PVOID)((ULONG_PTR)DesktopHeapSystemBase + HeapSize);
+   RtlCopyMemory(DesktopObject->pDeskInfo->szDesktopName,
                  lpszDesktopName->Buffer,
                  lpszDesktopName->Length);
 
@@ -1928,7 +1928,7 @@
         if (GetWin32ClientInfo()->pDeskInfo == NULL)
         {
            GetWin32ClientInfo()->pDeskInfo = 
-                (PVOID)((ULONG_PTR)DesktopObject->DesktopInfo - 
+                (PVOID)((ULONG_PTR)DesktopObject->pDeskInfo - 
                                           GetWin32ClientInfo()->ulClientDelta);
         }
     }
@@ -1979,7 +1979,7 @@
             pci->ulClientDelta = DesktopHeapGetUserDelta();
             if (DesktopObject)
             {
-                pci->pDeskInfo = (PVOID)((ULONG_PTR)DesktopObject->DesktopInfo - pci->ulClientDelta);
+                pci->pDeskInfo = (PVOID)((ULONG_PTR)DesktopObject->pDeskInfo - pci->ulClientDelta);
             }
         }
 

Modified: trunk/reactos/subsystems/win32/win32k/ntuser/input.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntuser/input.c?rev=44576&r1=44575&r2=44576&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/input.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/input.c [iso-8859-1] Mon Dec 14 07:48:40 2009
@@ -1462,7 +1462,7 @@
          Msg.hwnd = FocusMessageQueue->FocusWindow;
          DPRINT("Msg.hwnd = %x\n", Msg.hwnd);
 
-         FocusMessageQueue->Desktop->DesktopInfo->LastInputWasKbd = TRUE;
+         FocusMessageQueue->Desktop->pDeskInfo->LastInputWasKbd = TRUE;
 
          IntGetCursorLocation(FocusMessageQueue->Desktop->WindowStation,
                               &Msg.pt);

Modified: trunk/reactos/subsystems/win32/win32k/ntuser/message.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntuser/message.c?rev=44576&r1=44575&r2=44576&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/message.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/message.c [iso-8859-1] Mon Dec 14 07:48:40 2009
@@ -571,7 +571,7 @@
                {
                   /* post the message to the other window */
                   Msg->hwnd = Wnd->hSelf;
-                  if(!(Wnd->Status & WINDOWSTATUS_DESTROYING))
+                  if(!(Wnd->state & WINDOWSTATUS_DESTROYING))
                   {
                      MsqPostMessage(Wnd->MessageQueue, Msg, FALSE,
                                     Msg->message == WM_MOUSEMOVE ? QS_MOUSEMOVE :
@@ -1163,7 +1163,7 @@
          return FALSE;
       }
 
-      if ( Window->Status & WINDOWSTATUS_DESTROYING )
+      if ( Window->state & WINDOWSTATUS_DESTROYING )
       {
          DPRINT1("Attempted to post message to window 0x%x that is being destroyed!\n", Wnd);
          /* FIXME - last error code? */
@@ -1290,7 +1290,7 @@
       RETURN( FALSE);
    }
 
-   if (Window->Status & WINDOWSTATUS_DESTROYING)
+   if (Window->state & WINDOWSTATUS_DESTROYING)
    {
       /* FIXME - last error? */
       DPRINT1("Attempted to send message to window 0x%x that is being destroyed!\n", hWnd);
@@ -1457,7 +1457,7 @@
    }
 
    /* Check for an exiting window. */
-   if (Window && Window->Status & WINDOWSTATUS_DESTROYING)
+   if (Window && Window->state & WINDOWSTATUS_DESTROYING)
    {
       DPRINT1("co_IntDoSendMessage Window Exiting!\n");
    }

Modified: trunk/reactos/subsystems/win32/win32k/ntuser/misc.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntuser/misc.c?rev=44576&r1=44575&r2=44576&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/misc.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/misc.c [iso-8859-1] Mon Dec 14 07:48:40 2009
@@ -471,7 +471,7 @@
 
     if (pti->Desktop != NULL)
     {
-       pti->pDeskInfo = pti->Desktop->DesktopInfo;
+       pti->pDeskInfo = pti->Desktop->pDeskInfo;
     }
     else
     {

Modified: trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c?rev=44576&r1=44575&r2=44576&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c [iso-8859-1] Mon Dec 14 07:48:40 2009
@@ -839,7 +839,7 @@
          Msg.hwnd = FocusMessageQueue->FocusWindow;
          DPRINT("Msg.hwnd = %x\n", Msg.hwnd);
 
-         FocusMessageQueue->Desktop->DesktopInfo->LastInputWasKbd = TRUE;
+         FocusMessageQueue->Desktop->pDeskInfo->LastInputWasKbd = TRUE;
 
          IntGetCursorLocation(FocusMessageQueue->Desktop->WindowStation,
                               &Msg.pt);

Modified: trunk/reactos/subsystems/win32/win32k/ntuser/painting.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntuser/painting.c?rev=44576&r1=44575&r2=44576&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/painting.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/painting.c [iso-8859-1] Mon Dec 14 07:48:40 2009
@@ -195,7 +195,7 @@
             GDIOBJ_SetOwnership(Window->UpdateRegion, PsGetCurrentProcess());
             GreDeleteObject(Window->UpdateRegion);
             Window->UpdateRegion = NULL;
-            if (!(Window->Flags & WINDOWOBJECT_NEED_INTERNALPAINT))
+            if (!(Window->state & WINDOWOBJECT_NEED_INTERNALPAINT))
                MsqDecPaintCountQueue(Window->MessageQueue);
          }
       }
@@ -237,17 +237,17 @@
       if (Flags & RDW_UPDATENOW)
       {
          if (Window->UpdateRegion != NULL ||
-             Window->Flags & WINDOWOBJECT_NEED_INTERNALPAINT)
+             Window->state & WINDOWOBJECT_NEED_INTERNALPAINT)
          {
             co_IntSendMessage(hWnd, WM_PAINT, 0, 0);
          }
       }
       else
       {
-         if (Window->Flags & WINDOWOBJECT_NEED_NCPAINT)
+         if (Window->state & WINDOWOBJECT_NEED_NCPAINT)
          {
             TempRegion = IntGetNCUpdateRgn(Window, TRUE);
-            Window->Flags &= ~WINDOWOBJECT_NEED_NCPAINT;
+            Window->state &= ~WINDOWOBJECT_NEED_NCPAINT;
             MsqDecPaintCountQueue(Window->MessageQueue);
             co_IntSendMessage(hWnd, WM_NCPAINT, (WPARAM)TempRegion, 0);
             if ((HANDLE) 1 != TempRegion && NULL != TempRegion)
@@ -257,7 +257,7 @@
             }
          }
 
-         if (Window->Flags & WINDOWOBJECT_NEED_ERASEBKGND)
+         if (Window->state & WINDOWOBJECT_NEED_ERASEBKGND)
          {
             if (Window->UpdateRegion)
             {
@@ -266,7 +266,7 @@
                                  DCX_INTERSECTRGN | DCX_KEEPCLIPRGN);
                if (co_IntSendMessage(hWnd, WM_ERASEBKGND, (WPARAM)hDC, 0))
                {
-                  Window->Flags &= ~WINDOWOBJECT_NEED_ERASEBKGND;
+                  Window->state &= ~WINDOWOBJECT_NEED_ERASEBKGND;
                }
                UserReleaseDC(Window, hDC, FALSE);
             }
@@ -367,8 +367,8 @@
     */
 
    HadPaintMessage = Window->UpdateRegion != NULL ||
-                     Window->Flags & WINDOWOBJECT_NEED_INTERNALPAINT;
-   HadNCPaintMessage = Window->Flags & WINDOWOBJECT_NEED_NCPAINT;
+                     Window->state & WINDOWOBJECT_NEED_INTERNALPAINT;
+   HadNCPaintMessage = Window->state & WINDOWOBJECT_NEED_NCPAINT;
 
    /*
     * Update the region and flags
@@ -391,9 +391,9 @@
       }
 
       if (Flags & RDW_FRAME)
-         Window->Flags |= WINDOWOBJECT_NEED_NCPAINT;
+         Window->state |= WINDOWOBJECT_NEED_NCPAINT;
       if (Flags & RDW_ERASE)
-         Window->Flags |= WINDOWOBJECT_NEED_ERASEBKGND;
+         Window->state |= WINDOWOBJECT_NEED_ERASEBKGND;
 
       Flags |= RDW_FRAME;
    }
@@ -412,21 +412,21 @@
       }
 
       if (Window->UpdateRegion == NULL)
-         Window->Flags &= ~WINDOWOBJECT_NEED_ERASEBKGND;
+         Window->state &= ~WINDOWOBJECT_NEED_ERASEBKGND;
       if (Flags & RDW_NOFRAME)
-         Window->Flags &= ~WINDOWOBJECT_NEED_NCPAINT;
+         Window->state &= ~WINDOWOBJECT_NEED_NCPAINT;
       if (Flags & RDW_NOERASE)
-         Window->Flags &= ~WINDOWOBJECT_NEED_ERASEBKGND;
+         Window->state &= ~WINDOWOBJECT_NEED_ERASEBKGND;
    }
 
    if (Flags & RDW_INTERNALPAINT)
    {
-      Window->Flags |= WINDOWOBJECT_NEED_INTERNALPAINT;
+      Window->state |= WINDOWOBJECT_NEED_INTERNALPAINT;
    }
 
    if (Flags & RDW_NOINTERNALPAINT)
    {
-      Window->Flags &= ~WINDOWOBJECT_NEED_INTERNALPAINT;
+      Window->state &= ~WINDOWOBJECT_NEED_INTERNALPAINT;
    }
 
    /*
@@ -459,8 +459,8 @@
     */
 
    HasPaintMessage = Window->UpdateRegion != NULL ||
-                     Window->Flags & WINDOWOBJECT_NEED_INTERNALPAINT;
-   HasNCPaintMessage = Window->Flags & WINDOWOBJECT_NEED_NCPAINT;
+                     Window->state & WINDOWOBJECT_NEED_INTERNALPAINT;
+   HasNCPaintMessage = Window->state & WINDOWOBJECT_NEED_NCPAINT;
 
    if (HasPaintMessage != HadPaintMessage)
    {
@@ -612,8 +612,8 @@
    PWND Wnd = Window->Wnd;
    return (Wnd->style & WS_VISIBLE) &&
           ((Window->UpdateRegion != NULL) ||
-           (Window->Flags & WINDOWOBJECT_NEED_INTERNALPAINT) ||
-           (Window->Flags & WINDOWOBJECT_NEED_NCPAINT));
+           (Window->state & WINDOWOBJECT_NEED_INTERNALPAINT) ||
+           (Window->state & WINDOWOBJECT_NEED_NCPAINT));
 }
 
 HWND FASTCALL
@@ -770,12 +770,12 @@
 
    co_UserHideCaret(Window);
 
-   if (Window->Flags & WINDOWOBJECT_NEED_NCPAINT)
+   if (Window->state & WINDOWOBJECT_NEED_NCPAINT)
    {
       HRGN hRgn;
 
       hRgn = IntGetNCUpdateRgn(Window, FALSE);
-      Window->Flags &= ~WINDOWOBJECT_NEED_NCPAINT;
+      Window->state &= ~WINDOWOBJECT_NEED_NCPAINT;
       MsqDecPaintCountQueue(Window->MessageQueue);
       co_IntSendMessage(hWnd, WM_NCPAINT, (WPARAM)hRgn, 0);
       if (hRgn != (HANDLE)1 && hRgn != NULL)
@@ -803,17 +803,17 @@
    }
    else
    {
-      if (Window->Flags & WINDOWOBJECT_NEED_INTERNALPAINT)
+      if (Window->state & WINDOWOBJECT_NEED_INTERNALPAINT)
          MsqDecPaintCountQueue(Window->MessageQueue);
 
       IntGetClientRect(Window, &Ps.rcPaint);
    }
 
-   Window->Flags &= ~WINDOWOBJECT_NEED_INTERNALPAINT;
-
-   if (Window->Flags & WINDOWOBJECT_NEED_ERASEBKGND)
-   {
-      Window->Flags &= ~WINDOWOBJECT_NEED_ERASEBKGND;
+   Window->state &= ~WINDOWOBJECT_NEED_INTERNALPAINT;
+
+   if (Window->state & WINDOWOBJECT_NEED_ERASEBKGND)
+   {
+      Window->state &= ~WINDOWOBJECT_NEED_ERASEBKGND;
       Ps.fErase = !co_IntSendMessage(hWnd, WM_ERASEBKGND, (WPARAM)Ps.hdc, 0);
    }
    else

Modified: trunk/reactos/subsystems/win32/win32k/ntuser/vis.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntuser/vis.c?rev=44576&r1=44575&r2=44576&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/vis.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/vis.c [iso-8859-1] Mon Dec 14 07:48:40 2009
@@ -68,8 +68,8 @@
    CurrentWindow = Window->spwndParent;
    while (CurrentWindow)
    {
-      if ( CurrentWindow->Status & WINDOWSTATUS_DESTROYING ||
-           CurrentWindow->Status & WINDOWSTATUS_DESTROYED )
+      if ( CurrentWindow->state & WINDOWSTATUS_DESTROYING || // state2
+           CurrentWindow->state & WINDOWSTATUS_DESTROYED )
       {
          DPRINT1("ATM the Current Window or Parent is dead!\n");
          return NULL;

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=44576&r1=44575&r2=44576&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 Dec 14 07:48:40 2009
@@ -123,7 +123,7 @@
    }
 
    Window = (PWINDOW_OBJECT)UserGetObject(gHandleTable, hWnd, otWindow);
-   if (!Window || 0 != (Window->Status & WINDOWSTATUS_DESTROYED))
+   if (!Window || 0 != (Window->state & WINDOWSTATUS_DESTROYED))
    {
       SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
       return NULL;
@@ -365,12 +365,12 @@
 
    Wnd = Window->Wnd;
 
-   if(Window->Status & WINDOWSTATUS_DESTROYING)
+   if(Window->state & WINDOWSTATUS_DESTROYING)
    {
       DPRINT("Tried to call IntDestroyWindow() twice\n");
       return 0;
    }
-   Window->Status |= WINDOWSTATUS_DESTROYING;
+   Window->state |= WINDOWSTATUS_DESTROYING;
    Wnd->style &= ~WS_VISIBLE;
 
    IntNotifyWinEvent(EVENT_OBJECT_DESTROY, Wnd, OBJID_WINDOW, 0);
@@ -431,7 +431,7 @@
    MsqRemoveWindowMessagesFromQueue(Window);
 
    /* from now on no messages can be sent to this window anymore */
-   Window->Status |= WINDOWSTATUS_DESTROYED;
+   Window->state |= WINDOWSTATUS_DESTROYED;
    Wnd->state |= WNDS_DESTROYED;
    Wnd->fnid |= FNID_FREED;
 
@@ -1315,7 +1315,7 @@
 BOOL FASTCALL
 IntIsWindowInDestroy(PWINDOW_OBJECT Window)
 {
-   return ((Window->Status & WINDOWSTATUS_DESTROYING) == WINDOWSTATUS_DESTROYING);
+   return ((Window->state & WINDOWSTATUS_DESTROYING) == WINDOWSTATUS_DESTROYING);
 }
 
 
@@ -1339,7 +1339,7 @@
    {
       lpwndpl->showCmd = SW_HIDE;
    }
-   else if (0 != (Window->Flags & WINDOWOBJECT_RESTOREMAX) ||
+   else if (0 != (Window->state & WINDOWOBJECT_RESTOREMAX) ||
             0 != (Wnd->style & WS_MAXIMIZE))
    {
       lpwndpl->showCmd = SW_MAXIMIZE;
@@ -1850,7 +1850,7 @@
    {
       /* If there is no desktop window yet, we must be creating it */
       pti->Desktop->DesktopWindow = hWnd;
-      pti->Desktop->DesktopInfo->Wnd = Wnd;
+      pti->Desktop->pDeskInfo->Wnd = Wnd;
    }
 
    /*
@@ -2014,7 +2014,7 @@
       if (!(dwStyle & WS_POPUP))
       {
          dwStyle |= WS_CAPTION;
-         Window->Flags |= WINDOWOBJECT_NEED_SIZE;
+         Window->state |= WINDOWOBJECT_NEED_SIZE;
          DPRINT("4: Style is now %lx\n", dwStyle);
       }
    }
@@ -2334,7 +2334,7 @@
    IntNotifyWinEvent(EVENT_OBJECT_CREATE, Window->Wnd, OBJID_WINDOW, 0);
 
    /* Send move and size messages. */
-   if (!(Window->Flags & WINDOWOBJECT_NEED_SIZE))
+   if (!(Window->state & WINDOWOBJECT_NEED_SIZE))
    {
       LONG lParam;
 
@@ -4070,7 +4070,7 @@
    {
       Safepl.showCmd = SW_HIDE;
    }
-   else if ((0 != (Window->Flags & WINDOWOBJECT_RESTOREMAX) ||
+   else if ((0 != (Window->state & WINDOWOBJECT_RESTOREMAX) ||
             0 != (Wnd->style & WS_MAXIMIZE)) &&
             0 == (Wnd->style & WS_MINIMIZE))
    {

Modified: trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c?rev=44576&r1=44575&r2=44576&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c [iso-8859-1] Mon Dec 14 07:48:40 2009
@@ -325,12 +325,12 @@
             {
                if (Wnd->style & WS_MAXIMIZE)
                {
-                  Window->Flags |= WINDOWOBJECT_RESTOREMAX;
+                  Window->state |= WINDOWOBJECT_RESTOREMAX;
                   Wnd->style &= ~WS_MAXIMIZE;
                }
                else
                {
-                  Window->Flags &= ~WINDOWOBJECT_RESTOREMAX;
+                  Window->state &= ~WINDOWOBJECT_RESTOREMAX;
                }
                co_UserRedrawWindow(Window, NULL, 0, RDW_VALIDATE | RDW_NOERASE |
                                    RDW_NOINTERNALPAINT);
@@ -364,7 +364,7 @@
                if (Wnd->style & WS_MINIMIZE)
                {
                   Wnd->style &= ~WS_MINIMIZE;
-                  if (Window->Flags & WINDOWOBJECT_RESTOREMAX)
+                  if (Window->state & WINDOWOBJECT_RESTOREMAX)
                   {
                      co_WinPosGetMinMaxInfo(Window, &Size,
                                             &Wnd->InternalPos.MaxPos, NULL, NULL);
@@ -1478,12 +1478,12 @@
 
    /* FIXME: Check for window destruction. */
 
-   if ((Window->Flags & WINDOWOBJECT_NEED_SIZE) &&
-       !(Window->Status & WINDOWSTATUS_DESTROYING))
+   if ((Window->state & WINDOWOBJECT_NEED_SIZE) &&
+       !(Window->state & WINDOWSTATUS_DESTROYING))
    {
       WPARAM wParam = SIZE_RESTORED;
 
-      Window->Flags &= ~WINDOWOBJECT_NEED_SIZE;
+      Window->state &= ~WINDOWOBJECT_NEED_SIZE;
       if (Wnd->style & WS_MAXIMIZE)
       {
          wParam = SIZE_MAXIMIZED;




More information about the Ros-diffs mailing list