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.
This commit is contained in:
parent
4611327672
commit
80ecf605ec
@ -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())
|
||||
|
Loading…
x
Reference in New Issue
Block a user