Author: jimtabor
Date: Thu Jun 26 07:05:38 2008
New Revision: 34097
URL:
http://svn.reactos.org/svn/reactos?rev=34097&view=rev
Log:
Patch by Jeffrey Morlan <mrnobo1024 at yahoo.com>: Rearrange code in
NtGdiSelectBitmap to prevent deadlock. See bug 3333.
Modified:
trunk/reactos/subsystems/win32/win32k/objects/dc.c
Modified: trunk/reactos/subsystems/win32/win32k/objects/dc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/dc.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/dc.c [iso-8859-1] Thu Jun 26 07:05:38
2008
@@ -1955,6 +1955,9 @@
pDC->w.bitsPerPixel = BitsPerFormat(pBmp->SurfObj.iBitmapFormat);
}
+ hVisRgn = NtGdiCreateRectRgn(0, 0, pBmp->SurfObj.sizlBitmap.cx,
pBmp->SurfObj.sizlBitmap.cy);
+ BITMAPOBJ_UnlockBitmap(pBmp);
+
/* Regenerate the XLATEOBJs. */
pBrush = BRUSHOBJ_LockBrush(pDc_Attr->hbrush);
if (pBrush)
@@ -1979,9 +1982,6 @@
}
DC_UnlockDc(pDC);
-
- hVisRgn = NtGdiCreateRectRgn(0, 0, pBmp->SurfObj.sizlBitmap.cx,
pBmp->SurfObj.sizlBitmap.cy);
- BITMAPOBJ_UnlockBitmap(pBmp);
if (hVisRgn)
{