]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0947: GTK4: screen is cleared when moving the mouse after startup v9.2.0947
authorHirohito Higashi <h.east.727@gmail.com>
Wed, 12 Aug 2026 19:05:26 +0000 (19:05 +0000)
committerChristian Brabandt <cb@256bit.org>
Wed, 12 Aug 2026 19:05:26 +0000 (19:05 +0000)
Problem:  In GTK4, moving the mouse over the window right after startup
          clears the screen, including the intro message.
Solution: Keep the cached contents of the drawing area in sync with the
          size Vim is going to draw (Hirohito Higashi).

fixes:  #21016
closes: #21021

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/gui.c
src/version.c

index e2b3b40218ae9d430e8350aaf40b3307b40a3ba1..a1867753deb2ced266b198607c429f6eccc468dd 100644 (file)
--- a/src/gui.c
+++ b/src/gui.c
@@ -1864,6 +1864,10 @@ gui_set_shellsize(
     limit_screen_size();
     gui.num_cols = Columns;
     gui.num_rows = Rows;
+#ifdef USE_GTK4
+    // Keep the drawing area in sync with the size Vim is going to draw.
+    gui_gtk4_update_size();
+#endif
 
     min_width = base_width + MIN_COLUMNS * gui.char_width;
     min_height = base_height + MIN_LINES * gui.char_height;
index 7d7635c0454732d88bef459f76f3a7362e5eb815..3b27eab8b99842858a02b538647aeeb190efef05 100644 (file)
@@ -763,6 +763,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    947,
 /**/
     946,
 /**/