• Carlos Garnacho's avatar
    st: Track stylesheet changes on the StThemeContext · 6a42d772
    Carlos Garnacho authored and Florian Müllner's avatar Florian Müllner committed
    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
    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