Don't lock the primary surface just to get info we already have.
Modified: trunk/reactos/subsys/win32k/objects/dc.c

Modified: trunk/reactos/subsys/win32k/objects/dc.c
--- trunk/reactos/subsys/win32k/objects/dc.c	2005-05-30 12:52:38 UTC (rev 15680)
+++ trunk/reactos/subsys/win32k/objects/dc.c	2005-05-30 13:00:50 UTC (rev 15681)
@@ -729,7 +729,6 @@
   HDC      hNewDC;
   PDC      NewDC;
   HDC      hDC = NULL;
-  SURFOBJ *SurfObj;
   HRGN     hVisRgn;
   UNICODE_STRING StdDriver;
 
@@ -793,24 +792,13 @@
 
   if (! CreateAsIC)
   {
-    SurfObj = EngLockSurface((HSURF)PrimarySurface.Handle);
-    if ( !SurfObj )
-    {
-      DC_UnlockDc ( hNewDC );
-      DC_FreeDC ( hNewDC) ;
-      return NULL;
-    }
-    ASSERT(NewDC->GDIInfo->cBitsPixel * NewDC->GDIInfo->cPlanes == BitsPerFormat(SurfObj->iBitmapFormat));
-    ASSERT(NewDC->GDIInfo->ulHorzRes == SurfObj->sizlBitmap.cx);
-    ASSERT(NewDC->GDIInfo->ulVertRes == SurfObj->sizlBitmap.cy);
-
     NewDC->w.hPalette = NewDC->DevInfo->hpalDefault;
     NewDC->w.ROPmode = R2_COPYPEN;
 
     DC_UnlockDc( hNewDC );
 
-    hVisRgn = NtGdiCreateRectRgn(0, 0, SurfObj->sizlBitmap.cx,
-                                 SurfObj->sizlBitmap.cy);
+    hVisRgn = NtGdiCreateRectRgn(0, 0, NewDC->GDIInfo->ulHorzRes,
+                                 NewDC->GDIInfo->ulVertRes);
     NtGdiSelectVisRgn(hNewDC, hVisRgn);
     NtGdiDeleteObject(hVisRgn);
 
@@ -820,8 +808,6 @@
     NtGdiSetTextAlign(hNewDC, TA_TOP);
     NtGdiSetBkColor(hNewDC, RGB(255, 255, 255));
     NtGdiSetBkMode(hNewDC, OPAQUE);
-
-    EngUnlockSurface(SurfObj);
   }
   else
   {