win32: Don't save/restore the context for querying the font
authorBenjamin Otte <otte@redhat.com>
Tue, 21 Jan 2020 11:48:20 +0000 (12:48 +0100)
committerBenjamin Otte <otte@redhat.com>
Tue, 21 Jan 2020 11:48:20 +0000 (12:48 +0100)
Use the font in the current state.

gtk/gtkimcontextime.c

index ec009d40bb2462be2c2804488f7b6b802122a09e..241ac3d99f2022f4b42bb9915fc6cfa2f62bea98 100644 (file)
@@ -924,13 +924,10 @@ gtk_im_context_ime_set_preedit_font (GtkIMContext *context)
     }
 
   style = gtk_widget_get_style_context (widget);
-  gtk_style_context_save (style);
-  gtk_style_context_set_state (style, GTK_STATE_FLAG_NORMAL);
   gtk_style_context_get (style,
                          "font",
                          &font_desc,
                          NULL);
-  gtk_style_context_restore (style);
 
   if (lang[0])
     {