GNOME Bugzilla – Bug 759054
Pass correct state flags to GtkStyleContext API
Last modified: 2015-12-06 18:50:34 UTC
Created attachment 316799 [details] [review] Don't pass widget state to stylecontext API vte currently causes a few runtime warnings because of this. Patch attached
Hmm. It's rather odd that now the API wants to get always passed gtk_style_context_get_state(context) when it can just access that state internally. Is this a new requirement, or does using the context's state instead of the widget's state also work correctly on gtk < 3.19 (which vte will continue to work with) ?
Oh, saw those whitespace changes just now, sorry. The style context api here is rather unfortunate, yes. Passing anything else besides the current state of the style context has been broken for a while (I'm not sure exactly in what way it has been broken, or whether it has been broken only in special cases, etc. but that has been Benjamin's recommendation for a while). Strictly speaking, I don't think the first change here is necessary since the widget state should also be the style context state, but for consistency's sake it's better to always pass stylecontext state. The second hunk is more important since it now causes gtk+ to print warnings. All the changes should be backwards compatible, yes.
Updated the patch to git master and pushed.