Isn't the behavior seen with FLTK 1.4 what is expected given the documentation of Fl_Pack, as follows?
"The 'resizable()' for Fl_Pack is set to NULL by default. Its behavior is slightly different than in a normal Fl_Group widget: only if the resizable() widget is the last widget in the group it is extended to take the full available width or height, respectively, of the Fl_Pack group."
If I modify your test program setting the pack's resizable to b2 (instead of b1), the GUI appears to resize correctly
Isn't the behavior seen with FLTK 1.4 what is expected given the documentation of Fl_Pack, as follows?
"The 'resizable()' for Fl_Pack is set to NULL by default. Its behavior is slightly different than in a normal Fl_Group widget: only if the resizable() widget is the last widget in the group it is extended to take the full available width or height, respectively, of the Fl_Pack group."
If I modify your test program setting the pack's resizable to b2 (instead of b1), the GUI appears to resize correctly
That said, the OP (Robert) has a valid point: there is a behavior change between 1.3 and 1.4, i.e. existing programs would change their behavior when compiled with 1.4 vs. 1.3, but IMHO this can't be changed.
@Robert Arkiletian: Thanks for reporting this, anyway. I think we should add a note to the docs of 1.4 and higher to reflect this behavior change.
...
Formally setting any widget as resizable() of Fl_Pack was undefined (or at least undocumented) behavior before FLTK 1.4. The only documentation in 1.3 states that the resizable() of Fl_Pack was initialized to NULL.
Unfortunately the special resize behavior of Fl_Pack was not completely honored in 1.3 because the Fl_Group::resize() was not overridden in 1.3. This was fixed in 1.4. The side effect in 1.3 was that Fl_Group::resize() was executed implicitly when resizing an Fl_Pack and this made the button b1 in the example program resize in 1.3 as observed by the OP. Conclusion:
- The correct behavior is documented since 1.4, and it is implemented as documented since the behavior of the resize() method is now correctly documented.
- This implies that button b1 in the example program should not resize as expected by the OP because the resizable() is documented to be ignored - unless it's the last child.
- The behavior in 1.3 can be considered a bug or at least undefined behavior.
- Since the behavior in version 1.3 was not documented, the new behavior in version 1.4 does not represent a regression, but rather a bug fix.
That said, the OP (Robert) has a valid point: there is a behavior change between 1.3 and 1.4, i.e. existing programs would change their behavior when compiled with 1.4 vs. 1.3, but IMHO this can't be changed.