user32: fix stale sysfont values upon locale switch
Rafał Mużyło <[email protected]> Sat, 24 Mar 2018 21:49:31 +0100
| Newsgroups | gmane.comp.emulators.wine.patches |
|---|---|
| Message-ID | <20180324204931.GA3437@blackspire2> |
--wac7ysb48OaltWcw Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit If a prefix is created in one locale, then a program is run in it in a different locale, most locale-dependent font settings are already reset, yet there are a few values that aren't, namely those stored in 'HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics' *Font keys. This might mess up different things, as one of the fields stores charset, which is a base for certain MultiByteToWideChar conversions. This is the cleanest solution I could come up with. Signed-off-by: Rafał Mużyło <[email protected]> --wac7ysb48OaltWcw Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="wine-3.4-theme-font-fix.patch" --- a/dlls/user32/sysparams.c 2018-03-16 19:50:20.000000000 +0100 +++ b/dlls/user32/sysparams.c 2018-03-24 21:11:12.846567299 +0100 @@ -971,6 +971,7 @@ static BOOL get_font_entry( union syspar entry->font.val = font; break; } + entry->font.val.lfCharSet = DEFAULT_CHARSET; entry->hdr.loaded = TRUE; } *(LOGFONTW *)ptr_param = entry->font.val; --wac7ysb48OaltWcw Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline Cg== --wac7ysb48OaltWcw--