From 44123858ae4c06d8fa0c17c8e6edfc678b34be26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Sat, 13 Dec 2003 23:26:04 +0000 Subject: [PATCH] Remove optimization (not thread-safe) svn path=/trunk/; revision=7008 --- reactos/subsys/win32k/objects/dc.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/reactos/subsys/win32k/objects/dc.c b/reactos/subsys/win32k/objects/dc.c index 791cda67110..b6fa49c3595 100644 --- a/reactos/subsys/win32k/objects/dc.c +++ b/reactos/subsys/win32k/objects/dc.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: dc.c,v 1.112 2003/12/13 19:27:10 weiden Exp $ +/* $Id: dc.c,v 1.113 2003/12/13 23:26:04 gvg Exp $ * * DC.C - Device context functions * @@ -143,17 +143,13 @@ NtGdiCreateCompatableDC(HDC hDC) DisplayDC = NULL; if (hDC == NULL) { - hDC = IntGetScreenDC(); - if (NULL == hDC) + RtlInitUnicodeString(&DriverName, L"DISPLAY"); + DisplayDC = IntGdiCreateDC(&DriverName, NULL, NULL, NULL); + if (NULL == DisplayDC) { - RtlInitUnicodeString(&DriverName, L"DISPLAY"); - DisplayDC = IntGdiCreateDC(&DriverName, NULL, NULL, NULL); - if (NULL == DisplayDC) - { - return NULL; - } - hDC = DisplayDC; + return NULL; } + hDC = DisplayDC; } /* Allocate a new DC based on the original DC's device */ @@ -170,6 +166,7 @@ NtGdiCreateCompatableDC(HDC hDC) if (NULL == hNewDC) { + DC_UnlockDc(hDC); if (NULL != DisplayDC) { NtGdiDeleteDC(DisplayDC);