Skip to content
  • Lionel Landwerlin's avatar
    st-theme-node: let paint states take weak ref on theme nodes · a18fb27d
    Lionel Landwerlin authored
    When the St theme is changed, the StThemeContext unrefs all the theme
    nodes cached in it's internal hash table, then emits a signal to
    notify all theme nodes that the current theme has changed.
    
    The problem is that the first StWidget to catch a theme changed signal
    will trigger a "style-changed" signal catched by its children first.
    So the theme changed signal can't be processed properly to cleanup
    StThemeNodePaintState before recomputing the theme.
    
    This patch adds a weak ref to the StThemeNode in the
    StThemeNodePaintState to ensure paint states are properly cleaned up
    when the associated StThemeNode is freed.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=703859
    a18fb27d