From: Yasuhiro Matsumoto Date: Sat, 23 May 2026 18:49:43 +0000 (+0000) Subject: patch 9.2.0521: GTK4: cannot resize shell after the window is shown X-Git-Tag: v9.2.0521^0 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b34fa59abbd4f70b595ccab435446744443914d6;p=thirdparty%2Fvim.git patch 9.2.0521: GTK4: cannot resize shell after the window is shown Problem: GTK4: cannot resize shell after the window is shown (Maxim Kim, after v9.2.0501) Solution: Always apply the requested size with gtk_window_set_default_size(), regardless of realized state (Yasuhiro Matsumoto). fixes: #20264 closes: #20269 Co-Authored-by: Claude Signed-off-by: Yasuhiro Matsumoto Signed-off-by: Christian Brabandt --- diff --git a/src/gui_gtk4.c b/src/gui_gtk4.c index 4b02fe1a71..a9c9de7caf 100644 --- a/src/gui_gtk4.c +++ b/src/gui_gtk4.c @@ -772,15 +772,9 @@ gui_mch_set_shellsize(int width, int height, int base_width UNUSED, int base_height UNUSED, int direction UNUSED) { - // Only set window size if it hasn't been shown yet (initial sizing). - // After that, the window size is controlled by the user/WM and - // Vim adapts to it via form_size_allocate -> gui_resize_shell. - if (!gtk_widget_get_realized(gui.mainwin)) - { - width += get_menu_tool_width(); - height += get_menu_tool_height(); - gtk_window_set_default_size(GTK_WINDOW(gui.mainwin), width, height); - } + width += get_menu_tool_width(); + height += get_menu_tool_height(); + gtk_window_set_default_size(GTK_WINDOW(gui.mainwin), width, height); } void diff --git a/src/version.c b/src/version.c index 2b51332c9c..9decaeea3c 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 521, /**/ 520, /**/