widget: Use gdk_pango_get_for_display

This commit is contained in:
Matthias Clasen 2016-03-31 21:35:43 -04:00
parent 117c0c0aea
commit 921c154e38

View File

@ -10459,22 +10459,13 @@ gtk_widget_get_font_map (GtkWidget *widget)
PangoContext *
gtk_widget_create_pango_context (GtkWidget *widget)
{
GdkScreen *screen;
GdkDisplay *display;
PangoContext *context;
g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
screen = gtk_widget_get_screen_unchecked (widget);
if (!screen)
{
GTK_NOTE (MULTIHEAD,
g_warning ("gtk_widget_create_pango_context () called without screen"));
screen = gdk_screen_get_default ();
}
context = gdk_pango_context_get_for_screen (screen);
display = gtk_widget_get_display (widget);
context = gdk_pango_context_get_for_display (display);
update_pango_context (widget, context);
pango_context_set_language (context, gtk_get_default_language ());