Skip to content

st/theme-context: Also remove theme nodes on stylesheet changes

Jonas Dreßler requested to merge verdre/gnome-shell:fix-theme-node-crash into master

StThemeNodes are built around the assumption that they're "immutable", that means they are created once with certain parameters (that resolve to certain css properties) and then replaced with new ones in case those parameters changed.

Changes to the internal information stored by theme nodes (i.e. the css properties, font names or the cached scale-factor) are not all handled the same though: For changes to the font or the scale-factor we remove all theme nodes from the cache and let the widgets which are on stage generate new theme nodes. For changes to the css properties/the stylesheet, we invalidate the properties of all theme nodes but keep them in the cache using _st_theme_node_reset_for_stylesheet_change().

So be a bit more consistent and handle changes to the css-properties/the stylesheet stored by StThemeNodes the same way as changes to the font or scale-factor.

Edited by Jonas Dreßler

Merge request reports