Skip to content
  • Matthias Clasen's avatar
    gadget: Be careful in geometry calculations · 51af7049
    Matthias Clasen authored
    Margins can be negative, and if we are not careful, then
    content+padding+margin can end up with negative dimensions,
    which can upset pixman and others. This commit ensures
    that a gadget will not request or draw boxes with negative
    dimensions, and get_border_allocation and get_content_allocation
    will not return boxes with negative dimensions.
    
    This fixes a crash in the paned separator drawing code that
    can be reproduced by setting separator padding to 0.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=759657
    51af7049