Skip to content
  • Benjamin Otte's avatar
    widget: No longer postpone style-updated on unrealized widgets · ddcf4702
    Benjamin Otte authored
    GTK used to not emit GtkWidget::style-updated on widgets that weren't
    realized. This sped up construction of complex widgetry in the early
    days of GTK3 where we instantly invalidated on every change.
    We don't do that anymore, so in theory (and in my limited testing with
    widget-factory) this shouldn't be a prolem anymore.
    
    What is a problem though is that postponing style-updated leads to 2
    problems:
    (1) Unrealized widgets will not emit style-updated which may cause them
        to not properly update their state and return wrong values from
        get_preferred_width/height() etc
    (2) Emitting style-updated during realize can happen too late.
        When a widget is not made child-visible by its parent (common
        examples: notebook, paned) it will also not be realized when the
        parent is initially shown. However, when they get realized later
        (after a resize of the parent), they will emit style-updated (and
        potentially queue a resize) during size-allocate.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=765700
    ddcf4702