diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-08-23 16:20:47 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-08-23 16:20:47 +0200 |
| commit | 80ecf605ec666da48bb4179ce4ca0ed26d21f3b5 (patch) | |
| tree | b7c189c1ed1f252c1cbc009700805d535e864319 /src | |
| parent | 4611327672e78e6b8996e232810d3042c4f56db2 (diff) | |
Wayland: Fix obscure problem when closing file dialog under recent OS versions.
The problem is that the app sometimes stops after closing a file dialog window.
It results in fact from a bug in function draw_title_bar of libdecor-gtk.c that erroneously
calls libdecor_frame_set_max_content_size(). This bug is being proposed to be fixed
by a MR to libdecor.
But moving the libdecor_frame_set_min/max_content_size() calls after the capability changes
hides the bug, and the problem with file dialog doesn't show.
Diffstat (limited to 'src')
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx index b935fe604..38230b3db 100644 --- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx @@ -528,8 +528,6 @@ void Fl_Wayland_Window_Driver::size_range() { struct wld_window *wl_win = ip->xid; float f = Fl::screen_scale(pWindow->screen_num()); if (wl_win->kind == DECORATED && wl_win->frame) { - 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); int X,Y,W,H; Fl::screen_work_area(X,Y,W,H, Fl::screen_num(x(),y(),w(),h())); if (maxw() && maxw() < W && maxh() && maxh() < H) { @@ -542,6 +540,8 @@ void Fl_Wayland_Window_Driver::size_range() { } else { libdecor_frame_set_capabilities(wl_win->frame, LIBDECOR_ACTION_RESIZE); } + 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); } 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()) |
