patch 9.2.0521: GTK4: cannot resize shell after the window is shown

Commit: 
https://github.com/vim/vim/commit/b34fa59abbd4f70b595ccab435446744443914d6
Author: Yasuhiro Matsumoto <[email protected]>
Date:   Sat May 23 18:49:43 2026 +0000

    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 <[email protected]>
    Signed-off-by: Yasuhiro Matsumoto <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/src/gui_gtk4.c b/src/gui_gtk4.c
index 4b02fe1a7..a9c9de7ca 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 2b51332c9..9decaeea3 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,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1wQrZu-002jX1-41%40256bit.org.

Raspunde prin e-mail lui