Suppress warnings about deprecated pango_xft_get_context()

We can still use it as long as it exists, there is no benefit whatsoever
in using the new functions as the old one does exactly the same thing
anyhow.
This commit is contained in:
Vadim Zeitlin 2020-07-06 17:22:25 +02:00
parent eaee5416cf
commit 6119a7c630

View File

@ -721,8 +721,16 @@ PangoContext* wxApp::GetPangoContext()
Display *dpy = wxGlobalDisplay();
int xscreen = DefaultScreen(dpy);
// Calling pango_xft_get_context() is exactly the same as doing
// pango_font_map_create_context(pango_xft_get_font_map(dpy, xscreen))
// so continue to use it even if it's deprecated to not bother with
// checking for Pango 1.2 in configure and just disable the warning.
wxGCC_WARNING_SUPPRESS(deprecated-declarations)
s_pangoContext = pango_xft_get_context(dpy, xscreen);
wxGCC_WARNING_RESTORE(deprecated-declarations)
if (!PANGO_IS_CONTEXT(s_pangoContext))
{
wxLogError( wxT("No pango context.") );