summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Text_Display.cxx4
-rw-r--r--src/Fl_mac.cxx7
2 files changed, 8 insertions, 3 deletions
diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx
index 74e7aebc4..a0c8a5e05 100644
--- a/src/Fl_Text_Display.cxx
+++ b/src/Fl_Text_Display.cxx
@@ -659,10 +659,10 @@ void Fl_Text_Display::wrap_mode(int wrap, int wrapMargin) {
mContinuousWrap = wrap;
if (buffer()) {
- /* wrapping can change change the total number of lines, re-count */
+ /* wrapping can change the total number of lines, re-count */
mNBufferLines = count_lines(0, buffer()->length(), true);
- /* changing wrap margins wrap or changing from wrapped mode to non-wrapped
+ /* changing wrap margins or changing from wrapped mode to non-wrapped
can leave the character at the top no longer at a line start, and/or
change the line number */
mFirstChar = line_start(mFirstChar);
diff --git a/src/Fl_mac.cxx b/src/Fl_mac.cxx
index 64c27925f..f29a2cda8 100644
--- a/src/Fl_mac.cxx
+++ b/src/Fl_mac.cxx
@@ -1890,6 +1890,7 @@ void Fl_X::make(Fl_Window* w)
Fl_Tooltip::enter(0);
}
+ if (w->size_range_set) w->size_range_();
ShowWindow(x->xid);
Rect rect;
@@ -1909,10 +1910,14 @@ void Fl_X::make(Fl_Window* w)
/**
- * this is a leftover from X Windows
+ * Tell the OS what window sizes we want to allow
*/
void Fl_Window::size_range_() {
size_range_set = 1;
+ HISize minSize = { minw, minh };
+ HISize maxSize = { maxw?maxw:32000, maxh?maxh:32000 };
+ if (i && i->xid)
+ SetWindowResizeLimits(i->xid, &minSize, &maxSize);
}