Author: tkreuzer
Date: Thu Aug 17 09:08:57 2017
New Revision: 75582
URL:
http://svn.reactos.org/svn/reactos?rev=75582&view=rev
Log:
[WIN32K] Don't call IntIsFontRenderingEnabled() while holding an exclusive GDI object
lock.
Should fix GUI hangs.
Modified:
trunk/reactos/win32ss/gdi/ntgdi/freetype.c
Modified: trunk/reactos/win32ss/gdi/ntgdi/freetype.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/freetype…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/freetype.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/freetype.c [iso-8859-1] Thu Aug 17 09:08:57 2017
@@ -5111,6 +5111,10 @@
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 @@
EmuBold = (plf->lfWeight >= FW_BOLD && FontGDI->OriginalWeight <=
FW_NORMAL);
EmuItalic = (plf->lfItalic && !FontGDI->OriginalItalic);
- Render = IntIsFontRenderingEnabled();
if (Render)
RenderMode = IntGetFontRenderMode(plf);
else