Wayland: keep window resizable after native file chooser - cont'd

This commit is contained in:
ManoloFLTK 2023-04-20 16:45:18 +02:00
parent bcab001eb5
commit 9a00f36113
2 changed files with 5 additions and 4 deletions

View File

@ -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;

View File

@ -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())