[PATCH 2/3] conhost: Only create the new console font once
Hugh McMaster
hugh.mcmaster at outlook.com
Tue Mar 1 23:15:56 CST 2022
Hi Jacek,
On Wed, 2 Mar 2022 at 03:15, Jacek Caban wrote:
>
> On 3/1/22 12:37, Hugh McMaster wrote:
> > case PSN_APPLY:
> > - val = SendDlgItemMessageW( dialog, IDC_FNT_LIST_SIZE, LB_GETCURSEL, 0, 0 );
> > - if (val < di->font_count)
> > - {
> > - LOGFONTW lf;
> > -
> > - fill_logfont( &lf, di->font[val].faceName,
> > - wcslen(di->font[val].faceName) * sizeof(WCHAR),
> > - di->font[val].height, di->font[val].weight );
> > - DeleteObject( select_font_config( &di->config, di->console->output_cp,
> > - di->console->win, &lf ));
> > - }
> > -
> > + DeleteObject( di->hfont );
>
>
> font_preview_proc already deletes current font in its WM_DESTROY, isn't
> that enough to clean up the font?
Yes, it is - we don't want two calls to DeleteObject (not harmful,
just not needed).
Sorry for totally missing the WM_DESTROY case.
More information about the wine-devel
mailing list