From 921c154e386698eb83e06d87823ce1b25ab5d779 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 31 Mar 2016 21:35:43 -0400 Subject: [PATCH] widget: Use gdk_pango_get_for_display --- gtk/gtkwidget.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 0a29c48354..1e87e10ef9 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -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 ());