diff options
Diffstat (limited to 'src/Fl_cocoa.mm')
| -rw-r--r-- | src/Fl_cocoa.mm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index e15115026..5cf74ea3e 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -2954,9 +2954,11 @@ Fl_X* Fl_Cocoa_Window_Driver::makeWindow() } else { if (w->resizable()) { Fl_Widget *o = w->resizable(); - int minw = o->w(); if (minw > 100) minw = 100; - int minh = o->h(); if (minh > 100) minh = 100; - w->size_range(w->w() - o->w() + minw, w->h() - o->h() + minh, 0, 0); + int minw = w->w(); // minw is window's initial width + int minh = w->h(); // minh is window's initial height + int maxw = (o->w() == 0) ? minw : 0; // if resizable w()==0, disable resize w() + int maxh = (o->h() == 0) ? minh : 0; // if resizable h()==0, disable resize h() + w->size_range(minw, minh, maxw, maxh); if (w->border()) winstyle |= NSResizableWindowMask; } else { w->size_range(w->w(), w->h(), w->w(), w->h()); |
