Use Fl_Window_Driver::is_resizable() to check whether window can be resized

This commit is contained in:
ManoloFLTK 2024-03-03 23:06:59 +01:00
parent bbbc3a739c
commit f87aad7464
2 changed files with 3 additions and 3 deletions

View File

@ -89,7 +89,7 @@ void Fl_Cocoa_Window_Driver::draw_end()
{
// on OS X, windows have no frame. Before OS X 10.7, to resize a window, we drag the lower right
// corner. This code draws a little ribbed triangle for dragging.
if (fl_mac_os_version < 100700 && !parent() && pWindow->resizable() &&
if (fl_mac_os_version < 100700 && !parent() && is_resizable() &&
(!size_range_set() || minh() != maxh() || minw() != maxw())) {
int dx = Fl::box_dw(pWindow->box())-Fl::box_dx(pWindow->box());
int dy = Fl::box_dh(pWindow->box())-Fl::box_dy(pWindow->box());

View File

@ -885,7 +885,7 @@ static void handle_configure(struct libdecor_frame *frame,
if (is_2nd_run) {
width = libdecor_frame_get_content_width(frame);
height = libdecor_frame_get_content_height(frame);
if (!window->fl_win->resizable()) {
if (!driver->is_resizable()) {
libdecor_frame_set_min_content_size(frame, width, height);
libdecor_frame_set_max_content_size(frame, width, height);
}
@ -1416,7 +1416,7 @@ void Fl_Wayland_Window_Driver::makeWindow()
// appears in the Gnome desktop menu bar
libdecor_frame_set_app_id(new_window->frame, get_prog_name());
libdecor_frame_set_title(new_window->frame, pWindow->label()?pWindow->label():"");
if (!pWindow->resizable()) {
if (!is_resizable()) {
libdecor_frame_unset_capabilities(new_window->frame, LIBDECOR_ACTION_RESIZE);
libdecor_frame_unset_capabilities(new_window->frame, LIBDECOR_ACTION_FULLSCREEN);
}