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 767312 - gtk_widget_path_append_for_widget() misses classes unless gtk_widget_get_style_context() has been called
gtk_widget_path_append_for_widget() misses classes unless gtk_widget_get_styl...
Product: gtk+
Classification: Platform
Component: Widget: Other
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
Depends on:
Reported: 2016-06-07 05:14 UTC by Karl Tomlinson
Modified: 2016-06-07 16:01 UTC
See Also:
GNOME target: ---
GNOME version: ---

Description Karl Tomlinson 2016-06-07 05:14:41 UTC
This probably only shows up in 3.20, because before that widgets called
gtk_widget_get_style_context() to set classes.

I think the test on priv->context should be priv->cssnode.
Comment 1 Benjamin Otte (Company) 2016-06-07 16:01:08 UTC
commit 775e277ab9753609b45063eb8c0171b3103a252d
Author: Benjamin Otte <>
Date:   Tue Jun 7 16:08:52 2016 +0200

    widget: Add classes to widget path even if no style context exists yet
    This removes leftover code from when classes where added to the style
    Now that they get added directly to css nodes, the classes can exist
    without a style context.