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_win32.cxx | |
| parent | c1333a2dec3616dbd6a53089885b48aee1d11a8d (diff) | |
Remove useless Fl_Window_Driver accessors after new member Fl_Window::get_size_range()
Diffstat (limited to 'src/Fl_win32.cxx')
| -rw-r--r-- | src/Fl_win32.cxx | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index 2ff007c79..ce5cf0c72 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -1761,6 +1761,8 @@ int Fl_WinAPI_Window_Driver::fake_X_wm(int &X, int &Y, int &bt, int &bx, int &by int fallback = 1; float s = Fl::screen_driver()->scale(screen_num()); + int minw, minh, maxw, maxh; + pWindow->get_size_range(&minw, &minh, &maxw, &maxh, NULL, NULL, NULL); if (!w->parent()) { if (fl_xid(w) || style) { // The block below calculates the window borders by requesting the @@ -1805,7 +1807,7 @@ int Fl_WinAPI_Window_Driver::fake_X_wm(int &X, int &Y, int &bt, int &bx, int &by yoff = by + bt; dx = W - int(w->w() * s); dy = H - int(w->h() * s); - if (maxw() != minw() || maxh() != minh()) + if (maxw != minw || maxh != minh) ret = 2; else ret = 1; @@ -1816,7 +1818,7 @@ int Fl_WinAPI_Window_Driver::fake_X_wm(int &X, int &Y, int &bt, int &bx, int &by // This is the original (pre 1.1.7) routine to calculate window border sizes. if (fallback) { if (w->border() && !w->parent()) { - if (maxw() != minw() || maxh() != minh()) { + if (maxw != minw || maxh != minh) { ret = 2; bx = GetSystemMetrics(SM_CXSIZEFRAME); by = GetSystemMetrics(SM_CYSIZEFRAME); @@ -2256,16 +2258,18 @@ void Fl_WinAPI_Window_Driver::set_minmax(LPMINMAXINFO minmax) { hd *= 2; hd += td; + int minw, minh, maxw, maxh; + pWindow->get_size_range(&minw, &minh, &maxw, &maxh, NULL, NULL, NULL); float s = Fl::screen_driver()->scale(screen_num()); - minmax->ptMinTrackSize.x = LONG(s * minw()) + wd; - minmax->ptMinTrackSize.y = LONG(s * minh()) + hd; - if (maxw()) { - minmax->ptMaxTrackSize.x = LONG(s * maxw()) + wd; - minmax->ptMaxSize.x = LONG(s * maxw()) + wd; + minmax->ptMinTrackSize.x = LONG(s * minw) + wd; + minmax->ptMinTrackSize.y = LONG(s * minh) + hd; + if (maxw) { + minmax->ptMaxTrackSize.x = LONG(s * maxw) + wd; + minmax->ptMaxSize.x = LONG(s * maxw) + wd; } - if (maxh()) { - minmax->ptMaxTrackSize.y = LONG(s * maxh()) + hd; - minmax->ptMaxSize.y = LONG(s * maxh()) + hd; + if (maxh) { + minmax->ptMaxTrackSize.y = LONG(s * maxh) + hd; + minmax->ptMaxSize.y = LONG(s * maxh) + hd; } } |
