diff --git a/modules/input/gtkimcontextime.c b/modules/input/gtkimcontextime.c index 5d2c15a329..d76f180d6d 100644 --- a/modules/input/gtkimcontextime.c +++ b/modules/input/gtkimcontextime.c @@ -941,7 +941,14 @@ gtk_im_context_ime_set_preedit_font (GtkIMContext *context) } style = gtk_widget_get_style_context (widget); - gtk_style_context_get (style, GTK_STATE_FLAG_NORMAL, "font", &font_desc, NULL); + gtk_style_context_save (style); + gtk_style_context_set_state (style, GTK_STATE_FLAG_NORMAL); + gtk_style_context_get (style, + gtk_style_context_get_state (style), + "font", + &font_desc, + NULL); + gtk_style_context_restore (style); if (lang[0]) {