[WIN32K]
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Thu, 22 Apr 2010 03:53:49 +0000 (03:53 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Thu, 22 Apr 2010 03:53:49 +0000 (03:53 +0000)
- Call DC_vPrepareDCsForBlit in IntRectangle with device coordinates instead of in NtGdiRectangle with logical coordinates. Fixes updating mouse pointer.
- Update TODO.txt

svn path=/branches/reactos-yarotows/; revision=46986

subsystems/win32/win32k/TODO.txt
subsystems/win32/win32k/objects/fillshap.c

index 720d9c7..5c4b67f 100644 (file)
@@ -10,7 +10,6 @@ requirements before it can be handled.
 
 Before the merge:
 -----------------
-# Fix mouse pointer regression
 # Resize the desktop window after mode switch
 # Update mouse area after mode switch
 # Invalidate the whole Window content after mode switch
index 5fd09fd..070319d 100644 (file)
@@ -539,19 +539,6 @@ IntRectangle(PDC dc,
 
     pdcattr = dc->pdcattr;
 
-    /* Do we rotate or shear? */
-    if (!(dc->dclevel.mxWorldToDevice.flAccel & MX_SCALE))
-    {
-
-        POINTL DestCoords[4];
-        ULONG  PolyCounts = 4;
-        DestCoords[0].x = DestCoords[3].x = LeftRect;
-        DestCoords[0].y = DestCoords[1].y = TopRect;
-        DestCoords[1].x = DestCoords[2].x = RightRect;
-        DestCoords[2].y = DestCoords[3].y = BottomRect;
-        // Use IntGdiPolyPolygon so to support PATH.
-        return IntGdiPolyPolygon(dc, DestCoords, &PolyCounts, 1);
-    }
     // Rectangle Path only.
     if ( PATH_IsPathOpen(dc->dclevel) )
     {
@@ -577,6 +564,8 @@ IntRectangle(PDC dc,
         DestRect.bottom--;
     }
 
+    DC_vPrepareDCsForBlit(dc, DestRect, NULL, DestRect);
+
     if (pdcattr->ulDirty_ & (DIRTY_FILL | DC_BRUSH_DIRTY))
         DC_vUpdateFillBrush(dc);
 
@@ -590,6 +579,7 @@ IntRectangle(PDC dc,
         ret = FALSE;
         goto cleanup;
     }
+
     psurf = dc->dclevel.pSurface;
     if (!psurf)
     {
@@ -655,6 +645,8 @@ IntRectangle(PDC dc,
     }
 
 cleanup:
+    DC_vFinishBlit(dc, NULL);
+
     /* Move current position in DC?
        MSDN: The current position is neither used nor updated by Rectangle. */
 
@@ -671,7 +663,6 @@ NtGdiRectangle(HDC  hDC,
 {
     DC   *dc;
     BOOL ret; // default to failure
-    RECT rect = {LeftRect, TopRect, RightRect, BottomRect} ;
 
     dc = DC_LockDc(hDC);
     if (!dc)
@@ -686,16 +677,25 @@ NtGdiRectangle(HDC  hDC,
         return TRUE;
     }
 
-    DC_vPrepareDCsForBlit(dc, rect, NULL, rect);
-    if (dc->pdcattr->ulDirty_ & (DIRTY_FILL | DC_BRUSH_DIRTY))
-        DC_vUpdateFillBrush(dc);
+    /* Do we rotate or shear? */
+    if (!(dc->dclevel.mxWorldToDevice.flAccel & MX_SCALE))
+    {
+        POINTL DestCoords[4];
+        ULONG PolyCounts = 4;
 
-    if (dc->pdcattr->ulDirty_ & (DIRTY_LINE | DC_PEN_DIRTY))
-        DC_vUpdateLineBrush(dc);
+        DestCoords[0].x = DestCoords[3].x = LeftRect;
+        DestCoords[0].y = DestCoords[1].y = TopRect;
+        DestCoords[1].x = DestCoords[2].x = RightRect;
+        DestCoords[2].y = DestCoords[3].y = BottomRect;
+        // Use IntGdiPolyPolygon so to support PATH.
+        ret = IntGdiPolyPolygon(dc, DestCoords, &PolyCounts, 1);
+    }
+    else
+    {
+        ret = IntRectangle(dc, LeftRect, TopRect, RightRect, BottomRect );
+    }
 
-    ret = IntRectangle ( dc, LeftRect, TopRect, RightRect, BottomRect );
-    DC_vFinishBlit(dc, NULL);
-    DC_UnlockDc ( dc );
+    DC_UnlockDc(dc);
 
     return ret;
 }