[try2] winex11.drv: Change the font rendering method when the antialias type is changed in the runtime.
Byeongsik Jeon
bsjeon at hanmail.net
Sat Jan 3 19:57:42 CST 2009
Added the memory deallocation code...
2009-01-03 (Sat), 21:50 +0900, Byeongsik Jeon wrote:
> i. We can see the font rendering method change when the
> antialias type is changed in the runtime.
> We can test this patch with the ClearTweak.exe [1].
>
We can also test this patch with Microsoft Cleartype Tuner [1].
$ wine control.exe cttune.cpl
>
> ii. Not yet implemented:
> For the system wide font rendering change in the runtime,
> we need the WM_SETTINGCHANGE(WM_WININICHANGE) patch.
> But this is the user32.dll part patch.
>
Ahh!!! It's wrong. It's my mis-understatood.
I have tested it with MS Cleartype Tuner.
MS CT Tuner use the SystemParameterInfoW without SPIF_SENDCHANGE.
and use RedrawWindow(NULL, NULL, NULL,
RDW_INVALIDATE|RDW_ERASE|RDW_ALLCHILDREN);
ClearTweak.exe use the SystemParameterInfoA with SPIF_SENDCHANGE.
but broadcasted WM_SETTINGCHANGE message does not anything for
the system wide window redrawing in the MS Windows.
Now to conclude,
SystemParametersInfoW()'s caching mechanism need to fix.
The "spi_loaded[spi_idx]" variable have to set "FALSE" when the
other process call the SystemParametersInfo(SPI_SET...).
Or, the caching mechanism has to remove.
The following dirty test patch is good work with the MS CT Tuner
and the attached patch.
----------------------------------------------------------------------
diff --git a/dlls/user32/sysparams.c b/dlls/user32/sysparams.c
index 92dc912..a6458d8 100644
--- a/dlls/user32/sysparams.c
+++ b/dlls/user32/sysparams.c
@@ -803,7 +803,7 @@ static BOOL get_uint_param( unsigned int idx,
LPCWSTR regkey, LPCWSTR value,
UINT *value_ptr, UINT *ret_ptr )
{
if (!ret_ptr) return FALSE;
- if (!spi_loaded[idx])
+ //if (!spi_loaded[idx])
{
WCHAR buf[12];
@@ -2374,7 +2374,7 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction,
UINT uiParam,
WINE_SPI_FIXME(SPI_SETMOUSECLICKLOCKTIME); /* 0x2009 _WIN32_WINNT
>= 0x500 || _WIN32_WINDOW > 0x400 */
case SPI_GETFONTSMOOTHINGTYPE: /* 0x200A _WIN32_WINNT
>= 0x500 || _WIN32_WINDOW > 0x400 */
spi_idx = SPI_SETFONTSMOOTHINGTYPE_IDX;
- if (!spi_loaded[spi_idx])
+ //if (!spi_loaded[spi_idx])
{
ret = SYSPARAMS_Load( SPI_SETFONTSMOOTHINGTYPE_REGKEY,
SPI_SETFONTSMOOTHINGTYPE_VALNAME,
@@ -2403,7 +2403,7 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction,
UINT uiParam,
case SPI_GETFONTSMOOTHINGCONTRAST: /* 0x200C _WIN32_WINNT
>= 0x510 */
spi_idx = SPI_SETFONTSMOOTHINGCONTRAST_IDX;
- if (!spi_loaded[spi_idx])
+ //if (!spi_loaded[spi_idx])
{
ret = SYSPARAMS_Load( SPI_SETFONTSMOOTHINGCONTRAST_REGKEY,
SPI_SETFONTSMOOTHINGCONTRAST_VALNAME,
@@ -2437,7 +2437,7 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction,
UINT uiParam,
WINE_SPI_FIXME(SPI_SETFOCUSBORDERHEIGHT); /* 0x2011
_WIN32_WINNT >= 0x510 */
case SPI_GETFONTSMOOTHINGORIENTATION: /* 0x2012 */
spi_idx = SPI_SETFONTSMOOTHINGORIENTATION_IDX;
- if (!spi_loaded[spi_idx])
+ //if (!spi_loaded[spi_idx])
{
ret =
SYSPARAMS_Load( SPI_SETFONTSMOOTHINGORIENTATION_REGKEY,
SPI_SETFONTSMOOTHINGORIENTATION_VALNAME,
---------------------------------------------------------------------
Regards it.
> [1] http://www.ioisland.com/cleartweak/
> ---
> dlls/winex11.drv/xrender.c | 16 +++++++++-------
> 1 files changed, 9 insertions(+), 7 deletions(-)
>
[1] http://www.microsoft.com/windowsxp/Downloads/powertoys/Xppowertoys.mspx
---
dlls/winex11.drv/xrender.c | 106 ++++++++++++++++++++++++++------------------
1 files changed, 63 insertions(+), 43 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: c3c731b359764b35db702338bb7fd387077624fb.diff
Type: text/x-patch
Size: 5300 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20090104/ba21e9c2/attachment-0001.bin
More information about the wine-patches
mailing list