From e1e2478e776ef39791aa1f68f2359e3526644228 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Thu, 17 Aug 2017 09:08:57 +0000 Subject: [PATCH] [WIN32K] Don't call IntIsFontRenderingEnabled() while holding an exclusive GDI object lock. Should fix GUI hangs. svn path=/trunk/; revision=75582 --- reactos/win32ss/gdi/ntgdi/freetype.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/reactos/win32ss/gdi/ntgdi/freetype.c b/reactos/win32ss/gdi/ntgdi/freetype.c index 0c8fbdf7d84..485f09774fd 100644 --- a/reactos/win32ss/gdi/ntgdi/freetype.c +++ b/reactos/win32ss/gdi/ntgdi/freetype.c @@ -5111,6 +5111,10 @@ GreExtTextOutW( return FALSE; } + /* NOTE: This function locks the screen DC, so it must never be called + with a DC already locked */ + Render = IntIsFontRenderingEnabled(); + // TODO: Write test-cases to exactly match real Windows in different // bad parameters (e.g. does Windows check the DC or the RECT first?). dc = DC_LockDc(hDC); @@ -5238,7 +5242,6 @@ GreExtTextOutW( EmuBold = (plf->lfWeight >= FW_BOLD && FontGDI->OriginalWeight <= FW_NORMAL); EmuItalic = (plf->lfItalic && !FontGDI->OriginalItalic); - Render = IntIsFontRenderingEnabled(); if (Render) RenderMode = IntGetFontRenderMode(plf); else