diff --git a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx index c50d1fabc..e76820057 100644 --- a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx @@ -1641,10 +1641,6 @@ void *Fl_Wayland_Screen_Driver::control_maximize_button(void *data) { if (dim->tracker->exists()) { Fl_Window *win = (Fl_Window*)dim->tracker->widget(); win->size_range(dim->minw, dim->minh, dim->maxw, dim->maxh); - float f = Fl::screen_scale(win->screen_num()); - struct libdecor_state *state = libdecor_state_new(int(win->w() * f), int(win->h() * f)); - libdecor_frame_commit(fl_wl_xid(win)->frame, state, NULL); - libdecor_state_free(state); } first_dim = dim->next; delete dim->tracker; diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx index be8fe74ac..d96401d68 100644 --- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx @@ -536,6 +536,11 @@ void Fl_Wayland_Window_Driver::size_range() { } libdecor_frame_set_min_content_size(wl_win->frame, minw()*f, minh()*f); libdecor_frame_set_max_content_size(wl_win->frame, maxw()*f, maxh()*f); + if (xdg_toplevel()) { + struct libdecor_state *state = libdecor_state_new(int(w() * f), int(h() * f)); + libdecor_frame_commit(wl_win->frame, state, NULL); + libdecor_state_free(state); + } } else if (wl_win->kind == UNFRAMED && wl_win->xdg_toplevel) { xdg_toplevel_set_min_size(wl_win->xdg_toplevel, minw()*f, minh()*f); if (maxw() && maxh())