[ros-diffs] [khornicek] 44087: - sync IntShowMousePointer with trunk, don't invert the cursor mask in EngSetPointerShape - RosDrv_GetIconInfo: don't pass empty bmbits + remove the fixme, GetObject isn't really supposed to do that - fixes cursors once again

khornicek at svn.reactos.org khornicek at svn.reactos.org
Wed Nov 11 02:40:05 CET 2009


Author: khornicek
Date: Wed Nov 11 02:40:04 2009
New Revision: 44087

URL: http://svn.reactos.org/svn/reactos?rev=44087&view=rev
Log:
- sync IntShowMousePointer with trunk, don't invert the cursor mask in EngSetPointerShape
- RosDrv_GetIconInfo: don't pass empty bmbits + remove the fixme, GetObject isn't really supposed to do that
- fixes cursors once again

Modified:
    branches/arwinss/reactos/dll/win32/winent.drv/userdrv.c
    branches/arwinss/reactos/subsystems/win32/win32k/eng/engpoint.c

Modified: branches/arwinss/reactos/dll/win32/winent.drv/userdrv.c
URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winent.drv/userdrv.c?rev=44087&r1=44086&r2=44087&view=diff
==============================================================================
--- branches/arwinss/reactos/dll/win32/winent.drv/userdrv.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/winent.drv/userdrv.c [iso-8859-1] Wed Nov 11 02:40:04 2009
@@ -200,6 +200,7 @@
 {
     INT height;
     BITMAP bitmap;
+    PVOID pbits;
     static const WORD ICON_HOTSPOT = 0x4242; /* From user32/cursoricon.c:128 */
 
     TRACE("%p => %dx%d, %d bpp\n", ciconinfo,
@@ -223,13 +224,13 @@
 
     if (ciconinfo->bBitsPerPixel > 1)
     {
+        pbits = (char *)(ciconinfo + 1) + ciconinfo->nHeight * get_bitmap_width_bytes (ciconinfo->nWidth,1);
+
         iconinfo->hbmColor = CreateBitmap( ciconinfo->nWidth, ciconinfo->nHeight,
-                                ciconinfo->bPlanes, ciconinfo->bBitsPerPixel,
-                                (char *)(ciconinfo + 1)
-                                + ciconinfo->nHeight *
-                                get_bitmap_width_bytes (ciconinfo->nWidth,1) );
-        if( GetObjectW(iconinfo->hbmColor, sizeof(bitmap), &bitmap))
-            RosGdiCreateBitmap(NULL, iconinfo->hbmColor, &bitmap, bitmap.bmBits);
+                                           ciconinfo->bPlanes, ciconinfo->bBitsPerPixel,
+                                           pbits);
+        if(GetObjectW(iconinfo->hbmColor, sizeof(bitmap), &bitmap))
+            RosGdiCreateBitmap(NULL, iconinfo->hbmColor, &bitmap, pbits);
     }
     else
     {
@@ -237,13 +238,14 @@
         height *= 2;
     }
 
+    pbits = (char *)(ciconinfo + 1);
+
     /* Create the mask bitmap */
     iconinfo->hbmMask = CreateBitmap ( ciconinfo->nWidth, height,
-                                1, 1, ciconinfo + 1);
+                                       1, 1, pbits);
     if( GetObjectW(iconinfo->hbmMask, sizeof(bitmap), &bitmap))
     {
-        // FIXME: Why bitmap.bmBits is NULL when it's supposed to be a valid pointer from above ?!
-        RosGdiCreateBitmap(NULL, iconinfo->hbmMask, &bitmap, /*bitmap.bmBits*/ ciconinfo + 1);
+        RosGdiCreateBitmap(NULL, iconinfo->hbmMask, &bitmap, pbits);
     }
 }
 

Modified: branches/arwinss/reactos/subsystems/win32/win32k/eng/engpoint.c
URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win32/win32k/eng/engpoint.c?rev=44087&r1=44086&r2=44087&view=diff
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/eng/engpoint.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/eng/engpoint.c [iso-8859-1] Wed Nov 11 02:40:04 2009
@@ -124,16 +124,29 @@
     if (pgp->psurfColor)
     {
         GrepBitBltEx(psoDest,
-                       &pgp->psurfColor->SurfObj,
                        &pgp->psurfMask->SurfObj,
                        NULL,
-                       pgp->XlateObject,
+                       NULL,
+                       NULL,
                        &rclSurf,
                        (POINTL*)&rclPointer,
+                       NULL,
+                       NULL,
+                       NULL,
+                       ROP3_TO_ROP4(SRCAND),
+                       FALSE);
+
+        GrepBitBltEx(psoDest,
+                       &pgp->psurfColor->SurfObj,
+                       NULL,
+                       NULL,
+                       NULL,
+                       &rclSurf,
                        (POINTL*)&rclPointer,
                        NULL,
                        NULL,
-                       R4_MASK,
+                       NULL,
+                       ROP3_TO_ROP4(SRCINVERT),
                        FALSE);
     }
     else
@@ -142,7 +155,7 @@
                        &pgp->psurfMask->SurfObj,
                        NULL,
                        NULL,
-                       pgp->XlateObject,
+                       NULL,
                        &rclSurf,
                        (POINTL*)&rclPointer,
                        NULL,
@@ -157,7 +170,7 @@
                        &pgp->psurfMask->SurfObj,
                        NULL,
                        NULL,
-                       pgp->XlateObject,
+                       NULL,
                        &rclSurf,
                        (POINTL*)&rclPointer,
                        NULL,
@@ -377,8 +390,8 @@
                                   RGB(0xff,0xff,0xff),
                                   RGB(0,0,0));*/
             xlo = IntEngCreateSrcMonoXlate(ppdev->DevInfo.hpalDefault,
-                                           RGB(0xff,0xff,0xff),
-                                           RGB(0,0,0)
+                                           RGB(0x0,0x0,0x0),
+                                           RGB(0xff,0xff,0xff)
                                            );
 
             rcl.bottom = psoMask->sizlBitmap.cy;




More information about the Ros-diffs mailing list