diff --git a/CHANGES b/CHANGES index bb831a6cf..64746ba2b 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ CHANGES IN FLTK 1.1.3 - Documentation updates. + - The size_range() values were not honored under MacOS X. + [SF Bug #647074] - OpenGL windows didn't resize correctly on MacOS X. [SF Bug #667855] - The menus incorrectly used the overlay visual when one diff --git a/src/Fl_mac.cxx b/src/Fl_mac.cxx index d521ee272..72e95b45b 100644 --- a/src/Fl_mac.cxx +++ b/src/Fl_mac.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_mac.cxx,v 1.1.2.36 2002/10/30 01:01:52 matthiaswm Exp $" +// "$Id: Fl_mac.cxx,v 1.1.2.37 2003/01/14 21:30:15 easysw Exp $" // // MacOS specific code for the Fast Light Tool Kit (FLTK). // @@ -1626,6 +1626,14 @@ void Fl_Window::resize(int X,int Y,int W,int H) { Rect all; all.top=-32000; all.bottom=32000; all.left=-32000; all.right=32000; InvalWindowRect( i->xid, &all ); } + } else if (resize_from_system == this && size_range_set && !parent() && shown()) { + if (size_range_set) { + if (W < minw) W = minw; + else if (W > maxw && maxw) W = maxw; + if (H < minh) H = minh; + else if (H > maxh && maxh) H = maxh; + } + SizeWindow(i->xid, W>0 ? W : 1, H>0 ? H : 1, 1); } resize_from_system = 0; if (is_a_resize) { @@ -1750,6 +1758,6 @@ void Fl::paste(Fl_Widget &receiver, int clipboard) { // -// End of "$Id: Fl_mac.cxx,v 1.1.2.36 2002/10/30 01:01:52 matthiaswm Exp $". +// End of "$Id: Fl_mac.cxx,v 1.1.2.37 2003/01/14 21:30:15 easysw Exp $". // diff --git a/test/menubar.cxx b/test/menubar.cxx index 0fb1dc0ff..634c56d1a 100644 --- a/test/menubar.cxx +++ b/test/menubar.cxx @@ -1,5 +1,5 @@ // -// "$Id: menubar.cxx,v 1.6.2.8.2.4 2002/09/01 22:39:33 easysw Exp $" +// "$Id: menubar.cxx,v 1.6.2.8.2.5 2003/01/14 21:30:55 easysw Exp $" // // Menubar test program for the Fast Light Tool Kit (FLTK). // @@ -196,12 +196,12 @@ int main(int argc, char **argv) { menus[3] = &mb; Fl_Box b(200,200,200,100,"Press right button\nfor a pop-up menu"); window.resizable(&mb); - window.size_range(300,20); + window.size_range(300,400,0,400); window.end(); window.show(argc, argv); return Fl::run(); } // -// End of "$Id: menubar.cxx,v 1.6.2.8.2.4 2002/09/01 22:39:33 easysw Exp $". +// End of "$Id: menubar.cxx,v 1.6.2.8.2.5 2003/01/14 21:30:55 easysw Exp $". //