diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-05-27 11:34:34 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-05-27 11:39:27 +0200 |
| commit | f3f69b892d0755d3674502e1de8cd7c4abb43755 (patch) | |
| tree | bf393458e8cbd93aaccf80399575234e040309b1 /src/Fl_x.cxx | |
| parent | c1333a2dec3616dbd6a53089885b48aee1d11a8d (diff) | |
Remove useless Fl_Window_Driver accessors after new member Fl_Window::get_size_range()
Diffstat (limited to 'src/Fl_x.cxx')
| -rw-r--r-- | src/Fl_x.cxx | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index 6668fcf43..ede3e1608 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -2757,13 +2757,15 @@ void Fl_X11_Window_Driver::sendxjunk() { // memset(&hints, 0, sizeof(hints)); jreiser suggestion to fix purify? float s = Fl::screen_driver()->scale(screen_num()); - hints->min_width = s * minw(); - hints->min_height = s * minh(); - hints->max_width = s * maxw(); - hints->max_height = s * maxh(); + int minw, minh, maxw, maxh, dw, dh, aspect; + pWindow->get_size_range(&minw, &minh, &maxw, &maxh, &dw, &dh, &aspect); + hints->min_width = s * minw; + hints->min_height = s * minh; + hints->max_width = s * maxw; + hints->max_height = s * maxh; if (int(s) == s) { // use win size increment value only if scale is an integer. Is it possible to do better? - hints->width_inc = s * dw(); - hints->height_inc = s * dh(); + hints->width_inc = s * dw; + hints->height_inc = s * dh; } else { hints->width_inc = 0; hints->height_inc = 0; @@ -2789,7 +2791,7 @@ void Fl_X11_Window_Driver::sendxjunk() { if (hints->max_height < hints->min_height) hints->max_height = Fl::h()*s; } if (hints->width_inc && hints->height_inc) hints->flags |= PResizeInc; - if (aspect()) { + if (aspect) { // stupid X! It could insist that the corner go on the // straight line between min and max... hints->min_aspect.x = hints->max_aspect.x = hints->min_width; |
