patch 9.2.0947: GTK4: screen is cleared when moving the mouse after startup
Commit:
https://github.com/vim/vim/commit/62cf642965fb18387dea70c27575eeb0804508be
Author: Hirohito Higashi <
h.eas...@gmail.com>
Date: Wed Aug 12 19:05:26 2026 +0000
patch 9.2.0947: GTK4: screen is cleared when moving the mouse after startup
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) <
nor...@anthropic.com>
Signed-off-by: Hirohito Higashi <
h.eas...@gmail.com>
Signed-off-by: Christian Brabandt <
c...@256bit.org>
diff --git a/src/gui.c b/src/gui.c
index e2b3b4021..a1867753d 100644
--- 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;
diff --git a/src/version.c b/src/version.c
index 7d7635c04..3b27eab8b 100644
--- a/src/version.c
+++ b/src/version.c
@@ -763,6 +763,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 947,
/**/
946,
/**/