diff --git a/include/wx/gtk/window.h b/include/wx/gtk/window.h index 167600816a..2b0f5890c4 100644 --- a/include/wx/gtk/window.h +++ b/include/wx/gtk/window.h @@ -156,10 +156,11 @@ public: #ifdef __WXGTK20__ // Returns the default context which usually is anti-aliased PangoContext *GtkGetPangoDefaultContext(); - + // Returns the X11 context which renders on the X11 client // side (which can be remote) and which usually is not // anti-aliased and is thus faster + // MR: Deprecated and returning GtkGetPangoDefaultContext to avoid libpangox dependancy PangoContext *GtkGetPangoX11Context(); PangoContext *m_x11Context; #endif diff --git a/include/wx/gtk1/window.h b/include/wx/gtk1/window.h index 167600816a..2b0f5890c4 100644 --- a/include/wx/gtk1/window.h +++ b/include/wx/gtk1/window.h @@ -156,10 +156,11 @@ public: #ifdef __WXGTK20__ // Returns the default context which usually is anti-aliased PangoContext *GtkGetPangoDefaultContext(); - + // Returns the X11 context which renders on the X11 client // side (which can be remote) and which usually is not // anti-aliased and is thus faster + // MR: Deprecated and returning GtkGetPangoDefaultContext to avoid libpangox dependancy PangoContext *GtkGetPangoX11Context(); PangoContext *m_x11Context; #endif diff --git a/src/gtk/dcclient.cpp b/src/gtk/dcclient.cpp index 439bc7230e..822b809cdc 100644 --- a/src/gtk/dcclient.cpp +++ b/src/gtk/dcclient.cpp @@ -1796,13 +1796,10 @@ void wxWindowDC::SetFont( const wxFont &font ) if (m_font.Ok()) { m_fontdesc = m_font.GetNativeFontInfo()->description; - + if (m_owner) { - if (m_font.GetNoAntiAliasing()) - m_context = m_owner->GtkGetPangoX11Context(); - else - m_context = m_owner->GtkGetPangoDefaultContext(); + m_context = m_owner->GtkGetPangoDefaultContext(); } } #endif diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 9831a40fca..cf20d2ff40 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -4008,12 +4008,10 @@ PangoContext *wxWindowGTK::GtkGetPangoDefaultContext() return gtk_widget_get_pango_context( m_widget ); } +// MR: Deprecated and now returns the same as GtkGetPangoDefaultContext to avoid libpangox dependancy PangoContext *wxWindowGTK::GtkGetPangoX11Context() { - if (!m_x11Context) - m_x11Context = pango_x_get_context( gdk_display ); - - return m_x11Context; + return gtk_widget_get_pango_context( m_widget ); } #endif diff --git a/src/gtk1/dcclient.cpp b/src/gtk1/dcclient.cpp index 439bc7230e..822b809cdc 100644 --- a/src/gtk1/dcclient.cpp +++ b/src/gtk1/dcclient.cpp @@ -1796,13 +1796,10 @@ void wxWindowDC::SetFont( const wxFont &font ) if (m_font.Ok()) { m_fontdesc = m_font.GetNativeFontInfo()->description; - + if (m_owner) { - if (m_font.GetNoAntiAliasing()) - m_context = m_owner->GtkGetPangoX11Context(); - else - m_context = m_owner->GtkGetPangoDefaultContext(); + m_context = m_owner->GtkGetPangoDefaultContext(); } } #endif diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index 9831a40fca..cf20d2ff40 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -4008,12 +4008,10 @@ PangoContext *wxWindowGTK::GtkGetPangoDefaultContext() return gtk_widget_get_pango_context( m_widget ); } +// MR: Deprecated and now returns the same as GtkGetPangoDefaultContext to avoid libpangox dependancy PangoContext *wxWindowGTK::GtkGetPangoX11Context() { - if (!m_x11Context) - m_x11Context = pango_x_get_context( gdk_display ); - - return m_x11Context; + return gtk_widget_get_pango_context( m_widget ); } #endif