[ros-diffs] [rharabien] 52332: [WIN32K] - Don't clip siblings in co_WinPosSetWindowPos when window has no WS_CLIPSIBLINGS style. Fixes ReactOS about box. - Commented out line with WS_CLIPCHILDREN support needs...

rharabien at svn.reactos.org rharabien at svn.reactos.org
Sat Jun 18 12:41:29 UTC 2011


Author: rharabien
Date: Sat Jun 18 12:41:29 2011
New Revision: 52332

URL: http://svn.reactos.org/svn/reactos?rev=52332&view=rev
Log:
[WIN32K]
- Don't clip siblings in co_WinPosSetWindowPos when window has no WS_CLIPSIBLINGS style. Fixes ReactOS about box.
- Commented out line with WS_CLIPCHILDREN support needs more work
- Simplify co_WinPosSetWindowPos a bit

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

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=52332&r1=52331&r2=52332&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] Sat Jun 18 12:41:29 2011
@@ -156,12 +156,12 @@
 
    ASSERT_REFS_CO(Wnd);
 
-   Temp = IntSysCreateRectRgn(0, 0, 0, 0);
-   NtGdiCombineRgn(Temp, NewlyExposed, NULL, RGN_COPY);
-
    Parent = Wnd->spwndParent;
    if(Parent)
    {
+      Temp = IntSysCreateRectRgn(0, 0, 0, 0);
+
+      NtGdiCombineRgn(Temp, NewlyExposed, NULL, RGN_COPY);
       NtGdiOffsetRgn(Temp,
                      Wnd->rcWindow.left - Parent->rcClient.left,
                      Wnd->rcWindow.top - Parent->rcClient.top);
@@ -171,8 +171,9 @@
                           RDW_FRAME | RDW_ERASE | RDW_INVALIDATE |
                           RDW_ALLCHILDREN);
       UserDerefObjectCo(Parent);
+
+      GreDeleteObject(Temp);
    }
-   GreDeleteObject(Temp);
 }
 
 /* EOF */

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=52332&r1=52331&r2=52332&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] Sat Jun 18 12:41:29 2011
@@ -982,7 +982,6 @@
    int RgnType;
    HDC Dc;
    RECTL CopyRect;
-   RECTL TempRect;
    PWND Ancestor;
 
    ASSERT_REFS_CO(Window);
@@ -1033,17 +1032,19 @@
    if (!(WinPos.flags & SWP_NOREDRAW))
    {
       /* Compute the visible region before the window position is changed */
-      if (!(WinPos.flags & (SWP_NOREDRAW | SWP_SHOWWINDOW)) &&
+      if (!(WinPos.flags & SWP_SHOWWINDOW) &&
            (WinPos.flags & (SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER |
                              SWP_HIDEWINDOW | SWP_FRAMECHANGED)) !=
             (SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER))
       {
-         VisBefore = VIS_ComputeVisibleRegion(Window, FALSE, FALSE, TRUE);
+         VisBefore = VIS_ComputeVisibleRegion(Window, FALSE,
+                                              FALSE, //(Window->style & WS_CLIPCHILDREN) ? TRUE : FALSE,
+                                              (Window->style & WS_CLIPSIBLINGS) ? TRUE : FALSE);
          VisRgn = NULL;
 
          if ( VisBefore != NULL &&
              (VisRgn = (PROSRGNDATA)RGNOBJAPI_Lock(VisBefore, NULL)) &&
-              REGION_GetRgnBox(VisRgn, &TempRect) == NULLREGION )
+              REGION_Complexity(VisRgn) == NULLREGION )
          {
             RGNOBJAPI_Unlock(VisRgn);
             GreDeleteObject(VisBefore);
@@ -1084,8 +1085,8 @@
 
    /* FIXME: Actually do something with WVR_VALIDRECTS */
 
-   if ( NewClientRect.left != OldClientRect.left ||
-        NewClientRect.top  != OldClientRect.top)
+   if (NewClientRect.left != OldClientRect.left ||
+       NewClientRect.top  != OldClientRect.top)
    {
       WinPosInternalMoveWindow(Window,
                                NewClientRect.left - OldClientRect.left,
@@ -1095,7 +1096,7 @@
    Window->rcWindow = NewWindowRect;
    Window->rcClient = NewClientRect;
 
-   if (!(WinPos.flags & SWP_SHOWWINDOW) && (WinPos.flags & SWP_HIDEWINDOW))
+   if (WinPos.flags & SWP_HIDEWINDOW)
    {
       /* Clear the update region */
       co_UserRedrawWindow( Window,
@@ -1103,11 +1104,9 @@
                            0,
                            RDW_VALIDATE | RDW_NOFRAME | RDW_NOERASE | RDW_NOINTERNALPAINT | RDW_ALLCHILDREN);
 
-      if ((Window->style & WS_VISIBLE) &&
-          Window->spwndParent == UserGetDesktopWindow())
-      {
+      if (Window->spwndParent == UserGetDesktopWindow())
          co_IntShellHookNotify(HSHELL_WINDOWDESTROYED, (LPARAM)Window->head.h);
-      }
+
       Window->style &= ~WS_VISIBLE;
    }
    else if (WinPos.flags & SWP_SHOWWINDOW)
@@ -1130,12 +1129,14 @@
    if (!(WinPos.flags & SWP_NOREDRAW))
    {
       /* Determine the new visible region */
-      VisAfter = VIS_ComputeVisibleRegion(Window, FALSE, FALSE, TRUE);
+      VisAfter = VIS_ComputeVisibleRegion(Window, FALSE,
+                                          FALSE,//(Window->style & WS_CLIPCHILDREN) ? TRUE : FALSE,
+                                          (Window->style & WS_CLIPSIBLINGS) ? TRUE : FALSE);
       VisRgn = NULL;
 
       if ( VisAfter != NULL &&
           (VisRgn = (PROSRGNDATA)RGNOBJAPI_Lock(VisAfter, NULL)) &&
-           REGION_GetRgnBox(VisRgn, &TempRect) == NULLREGION )
+           REGION_Complexity(VisRgn) == NULLREGION )
       {
          RGNOBJAPI_Unlock(VisRgn);
          GreDeleteObject(VisAfter);
@@ -1309,15 +1310,13 @@
       if (VisBefore != NULL)
       {
          ExposedRgn = IntSysCreateRectRgn(0, 0, 0, 0);
-         NtGdiCombineRgn(ExposedRgn, VisBefore, NULL, RGN_COPY);
+         RgnType = NtGdiCombineRgn(ExposedRgn, VisBefore, NULL, RGN_COPY);
          NtGdiOffsetRgn( ExposedRgn,
                          OldWindowRect.left - NewWindowRect.left,
                          OldWindowRect.top  - NewWindowRect.top);
 
          if (VisAfter != NULL)
             RgnType = NtGdiCombineRgn(ExposedRgn, ExposedRgn, VisAfter, RGN_DIFF);
-         else
-            RgnType = SIMPLEREGION;
 
          if (RgnType != ERROR && RgnType != NULLREGION)
          {




More information about the Ros-diffs mailing list