After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 759054 - Pass correct state flags to GtkStyleContext API
Pass correct state flags to GtkStyleContext API
Status: RESOLVED FIXED
Product: vte
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: VTE Maintainers
VTE Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-12-05 09:02 UTC by Timm Bäder
Modified: 2015-12-06 18:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Don't pass widget state to stylecontext API (3.57 KB, patch)
2015-12-05 09:02 UTC, Timm Bäder
none Details | Review

Description Timm Bäder 2015-12-05 09:02:32 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
Comment 1 Christian Persch 2015-12-05 21:04:16 UTC
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) ?
Comment 2 Timm Bäder 2015-12-06 14:25:17 UTC
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.
Comment 3 Christian Persch 2015-12-06 18:50:34 UTC
Updated the patch to git master and pushed.