Avoid "Gtk-WARNING **: State doesn't match"

See https://github.com/wxWidgets/wxWidgets/pull/232
This commit is contained in:
Paul Cornett
2016-02-24 20:57:48 -08:00
parent d3a0798bc5
commit 69a13d973c
6 changed files with 9 additions and 1 deletions

View File

@@ -1835,6 +1835,7 @@ void wxTextCtrl::DoApplyWidgetStyle(GtkRcStyle *style)
gtk_style_context_save(context);
gtk_style_context_add_class(context, GTK_STYLE_CLASS_VIEW);
}
gtk_style_context_set_state(context, selectedFocused);
gtk_style_context_get(context, selectedFocused,
"color", &fg_orig, "background-color", &bg_orig,
NULL);