Commit d07f00d9 authored by Chun-wei Fan's avatar Chun-wei Fan

CJK Windows: Silence gtk_style_context_set_state() warnings

We need to update calls to gtk_style_context_set_state() in
gtkimcontextime.c, so that the state passed into that function would be in
line with what GtkStyleContext expects, due to updates in the CSS
machinery, as outlined in this link[1], which is based on information in
in Matthias' blog[2].

Doing so will silence the gtk_style_context_set_state() warnings, which is
emitted when a widget uses gtkimcontext on Windows with CJK IME, which will
in turn call gtkimcontextime.

parent 4eb33380
......@@ -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),
gtk_style_context_restore (style);
if (lang[0])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment