Skip to content

st: Track stylesheet changes on the StThemeContext

Carlos Garnacho requested to merge wip/carlosg/stylesheet-updates into master

Instead of every individual StThemeNode. There are essentially two kinds of theme nodes: Those we create for lookups, and those interned by the theme context and used by StWidgets. Listening to the signal on the former is pointless as they are short lived and not meant to be really used for drawing. So it is only essential to track stylesheet changes in those we intern for later use.

This change does precisely that, it lets the StThemeContext track the stylesheet changes and let all known theme nodes reset their state for it.

The internal array holding all connected handlers for this signal in glib was about the biggest single allocation made in gnome-shell, as interned theme nodes nodes are around the 4 to 5 digit numbers. This essentially makes it disappear.

This however means that widgets that are explicitly set a theme through st_widget_set_theme() don't get their theme node implicitly updated. There's little reasons to use that API, so perhaps this is an acceptable tradeoff.

Merge request reports