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) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Hirohito HigashiandClaude Opus 5 authored and Christian Brabandt committed 2026-08-12 19:05:26 +00:00
1 parent 2efa9e3179
commit 62cf642965
2 files changed
+6

No files matched your search

+4
View File
@@ -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;
+2
View File
@@ -763,6 +763,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
947,
/**/
946,
/**/