summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2024-02-07 12:38:58 +0100
committerAlbrecht Schlosser <albrechts.fltk@online.de>2024-02-07 12:38:58 +0100
commit1cf6fdfa8562fafa0566e1008f74ea94f71356e4 (patch)
tree5d1e3f0859fb64e7e3fb5d952c94a77ddfcd5e80
parentf0c1eff069426a83f24e2a361c898c7ca15df848 (diff)
Fix Fl_Window::default_size_range() (#901)
Thanks to Manolo for the patch.
-rw-r--r--src/Fl_Window.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Fl_Window.cxx b/src/Fl_Window.cxx
index d8b82562b..5d7f9be8e 100644
--- a/src/Fl_Window.cxx
+++ b/src/Fl_Window.cxx
@@ -773,7 +773,7 @@ void Fl_Window::default_size_range() {
// Clip the resizable() widget to the window
- int L = r->x();
+ int L = (r == this ? 0 : r->x());
int R = L + r->w();
if (R < 0 || L > w()) R = L; // outside the window
else {
@@ -782,7 +782,7 @@ void Fl_Window::default_size_range() {
}
int rw = R - L;
- int T = r->y();
+ int T = (r == this ? 0 : r->y());
int B = T + r->h();
if (B < 0 || T > h()) B = T; // outside the window
else {