[ros-diffs] [fireball] 27726: - Revert vis.c and winpos.c changes from 27672, due to a bug 2409. - Fix win32k compiling without compilation units. See issue #2409 for more details.

fireball at svn.reactos.org fireball at svn.reactos.org
Thu Jul 19 14:43:54 CEST 2007


Author: fireball
Date: Thu Jul 19 16:43:54 2007
New Revision: 27726

URL: http://svn.reactos.org/svn/reactos?rev=27726&view=rev
Log:
- Revert vis.c and winpos.c changes from 27672, due to a bug 2409.
- Fix win32k compiling without compilation units.

See issue #2409 for more details.

Modified:
    trunk/reactos/subsystems/win32/win32k/ntuser/painting.c
    trunk/reactos/subsystems/win32/win32k/ntuser/vis.c
    trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c

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=27726&r1=27725&r2=27726&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/painting.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/painting.c Thu Jul 19 16:43:54 2007
@@ -229,7 +229,7 @@
  * Internal function used by IntRedrawWindow.
  */
 
-static VOID FASTCALL
+VOID FASTCALL
 co_IntPaintWindows(PWINDOW_OBJECT Window, ULONG Flags, BOOL Recurse)
 {
    HDC hDC;

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=27726&r1=27725&r2=27726&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/vis.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/vis.c Thu Jul 19 16:43:54 2007
@@ -167,7 +167,7 @@
 
       UserRefObjectCo(Parent, &Ref);
       co_UserRedrawWindow(Parent, NULL, Temp,
-                          RDW_FRAME | RDW_ERASE | RDW_ERASENOW | RDW_INVALIDATE |
+                          RDW_FRAME | RDW_ERASE | RDW_INVALIDATE |
                           RDW_ALLCHILDREN);
       UserDerefObjectCo(Parent);
    }

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=27726&r1=27725&r2=27726&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c Thu Jul 19 16:43:54 2007
@@ -32,6 +32,12 @@
 
 #define NDEBUG
 #include <debug.h>
+
+VOID FASTCALL
+co_IntPaintWindows(PWINDOW_OBJECT Window, ULONG Flags, BOOL Recurse);
+
+BOOL FASTCALL
+IntValidateParent(PWINDOW_OBJECT Child, HRGN hValidateRgn, BOOL Recurse);
 
 /* GLOBALS *******************************************************************/
 
@@ -969,7 +975,7 @@
    }
 
    WvrFlags = co_WinPosDoNCCALCSize(Window, &WinPos, &NewWindowRect, &NewClientRect);
-
+    
     //DPRINT1("co_WinPosDoNCCALCSize");
 
    /* Relink windows. (also take into account shell window in hwndShellWindow) */
@@ -1197,7 +1203,6 @@
                         CopyRect.left + (OldWindowRect.left - NewWindowRect.left),
                         CopyRect.top + (OldWindowRect.top - NewWindowRect.top), SRCCOPY, 0, 0);
             UserReleaseDC(Window, Dc, FALSE);
-            IntValidateParent(Window, CopyRgn, FALSE);
             NtGdiOffsetRgn(CopyRgn, -NewWindowRect.left, -NewWindowRect.top);
          }
          else if(VisRgn)
@@ -1224,6 +1229,14 @@
          }
          if (RgnType != ERROR && RgnType != NULLREGION)
          {
+                      /* old code
+            NtGdiOffsetRgn(DirtyRgn, Window->WindowRect.left, Window->WindowRect.top);
+            IntInvalidateWindows(Window, DirtyRgn,
+               RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN);
+         }
+         NtGdiDeleteObject(DirtyRgn);
+         */
+
             PWINDOW_OBJECT Parent = Window->Parent;
 
             NtGdiOffsetRgn(DirtyRgn,
@@ -1234,16 +1247,13 @@
                 !(Parent->Style & WS_CLIPCHILDREN))
             {
                IntInvalidateWindows(Parent, DirtyRgn,
-                  RDW_ERASE | RDW_INVALIDATE | RDW_NOCHILDREN);
-               co_IntPaintWindows(Parent, RDW_ERASENOW | RDW_NOCHILDREN, FALSE);
-               IntInvalidateWindows(Window, DirtyRgn,
-                  RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN);
+                  RDW_ERASE | RDW_INVALIDATE);
+               co_IntPaintWindows(Parent, RDW_ERASENOW, FALSE);
             }
             else
             {
-               IntInvalidateWindows(Window, DirtyRgn,
-                  RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN);
-               co_IntPaintWindows(Window, RDW_ERASENOW, FALSE);
+                IntInvalidateWindows(Window, DirtyRgn,
+                RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN);
             }
          }
          NtGdiDeleteObject(DirtyRgn);
@@ -1294,33 +1304,6 @@
 
    if ((WinPos.flags & SWP_AGG_STATUSFLAGS) != SWP_AGG_NOPOSCHANGE)
       co_IntPostOrSendMessage(WinPos.hwnd, WM_WINDOWPOSCHANGED, 0, (LPARAM) &WinPos);
-
-   if ((Window->Flags & WINDOWOBJECT_NEED_SIZE) &&
-         !(Window->Status & WINDOWSTATUS_DESTROYING))
-   {
-      WPARAM wParam = SIZE_RESTORED;
-
-      Window->Flags &= ~WINDOWOBJECT_NEED_SIZE;
-      if (Window->Style & WS_MAXIMIZE)
-      {
-         wParam = SIZE_MAXIMIZED;
-      }
-      else if (Window->Style & WS_MINIMIZE)
-      {
-         wParam = SIZE_MINIMIZED;
-      }
-
-      co_IntSendMessage(Window->hSelf, WM_SIZE, wParam,
-                        MAKELONG(Window->ClientRect.right -
-                                 Window->ClientRect.left,
-                                 Window->ClientRect.bottom -
-                                 Window->ClientRect.top));
-      co_IntSendMessage(Window->hSelf, WM_MOVE, 0,
-                        MAKELONG(Window->ClientRect.left,
-                                 Window->ClientRect.top));
-      IntEngWindowChanged(Window, WOC_RGN_CLIENT);
-      
-   }
 
    return TRUE;
 }
@@ -1490,6 +1473,33 @@
 
    /* FIXME: Check for window destruction. */
 
+   if ((Window->Flags & WINDOWOBJECT_NEED_SIZE) &&
+         !(Window->Status & WINDOWSTATUS_DESTROYING))
+   {
+      WPARAM wParam = SIZE_RESTORED;
+
+      Window->Flags &= ~WINDOWOBJECT_NEED_SIZE;
+      if (Window->Style & WS_MAXIMIZE)
+      {
+         wParam = SIZE_MAXIMIZED;
+      }
+      else if (Window->Style & WS_MINIMIZE)
+      {
+         wParam = SIZE_MINIMIZED;
+      }
+
+      co_IntSendMessage(Window->hSelf, WM_SIZE, wParam,
+                        MAKELONG(Window->ClientRect.right -
+                                 Window->ClientRect.left,
+                                 Window->ClientRect.bottom -
+                                 Window->ClientRect.top));
+      co_IntSendMessage(Window->hSelf, WM_MOVE, 0,
+                        MAKELONG(Window->ClientRect.left,
+                                 Window->ClientRect.top));
+      IntEngWindowChanged(Window, WOC_RGN_CLIENT);
+      
+   }
+
    /* Activate the window if activation is not requested and the window is not minimized */
    /*
      if (!(Swp & (SWP_NOACTIVATE | SWP_HIDEWINDOW)) && !(Window->Style & WS_MINIMIZE))




More information about the Ros-diffs mailing list