[gtk/otte/for-master] win32: Don't save/restore the context for querying the font



commit d59784f7c74ba6f447f0d2b551a41ea71fed95a2
Author: Benjamin Otte <otte redhat com>
Date:   Tue Jan 21 12:48:20 2020 +0100

    win32: Don't save/restore the context for querying the font
    
    Use the font in the current state.

 gtk/gtkimcontextime.c | 3 ---
 1 file changed, 3 deletions(-)
---
diff --git a/gtk/gtkimcontextime.c b/gtk/gtkimcontextime.c
index ec009d40bb..241ac3d99f 100644
--- a/gtk/gtkimcontextime.c
+++ b/gtk/gtkimcontextime.c
@@ -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])
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]