• Cosimo Cecchi's avatar
    notebook: restore previous behaviour wrt. unparenting of tab labels · c1218f96
    Cosimo Cecchi authored
    When the tab label gets removed from the notebook on widget
    desctruction, we should still unconditionally unparent it from the
    notebook, since failing to do so will keep a stray reference alive.
    In case applications rely on the tab label being destroyed to release
    other references (e.g. because the tab label is a custom object, or
    another object's lifecycle is tied to it using g_object_set_data_full()),
    this will also possibly cause other references to get leaked.
    In Nautilus, the result was we were failing to release the reference to
    a NautilusWindowSlot, and other parts of the application relied
    on it being destroyed at a specific time instead, causing the
    application to crash when closing a window.
    This is a regression from commit
    This commit restores the previous unparenting behavior in case we're not
    in a DnD operation.
gtknotebook.c 262 KB