GNOME Bugzilla – Bug 629387
Use gint16 for GtkBorder
Last modified: 2010-09-13 17:17:20 UTC
GtkBorder was wasting space when embedded in other objects. 16-bit signed is enough for any reasonable border in a screen-displayed pixel layout. Signed is used because unsigned in layout math leads to lots of bugs (this is why GtkAllocation is signed, for example). Search through old logs for "unsigned" to find examples.
Created attachment 170050 [details] [review] Use gint16 for GtkBorder 32K of border ought to be enough for any pixel dimensions. At least until screens are so huge we start using doubles. This saves a nice 64 bits of space when we have a GtkBorder stored somewhere. Signed integers are used to avoid surprising unsigned math issues. Just search GTK's whole git log from inception for "unsigned" if you want to find any number of commits fixing signed/unsigned bugs.
This has been committed as part of the 'padding-cleanup' merge.