diff --git a/src/gui.c b/src/gui.c --- a/src/gui.c +++ b/src/gui.c @@ -1402,7 +1402,7 @@ if (!gui.shell_created) return; -#ifdef MSWIN +#if defined(MSWIN) || defined(FEAT_GUI_GTK) /* If not setting to a user specified size and maximized, calculate the * number of characters that fit in the maximized window. */ if (!mustset && gui_mch_maximized()) diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c --- a/src/gui_gtk_x11.c +++ b/src/gui_gtk_x11.c @@ -3901,6 +3901,17 @@ gtk_window_unmaximize(GTK_WINDOW(gui.mainwin)); } + void +gui_mch_newfont() +{ + int w, h; + + gtk_window_get_size(GTK_WINDOW(gui.mainwin), &w, &h); + w -= get_menu_tool_width(); + h -= get_menu_tool_height(); + gui_resize_shell(w, h); +} + /* * Set the windows size. */ diff --git a/src/proto/gui_gtk_x11.pro b/src/proto/gui_gtk_x11.pro --- a/src/proto/gui_gtk_x11.pro +++ b/src/proto/gui_gtk_x11.pro @@ -20,6 +20,7 @@ void gui_mch_set_winpos __ARGS((int x, int y)); int gui_mch_maximized __ARGS((void)); void gui_mch_unmaximize __ARGS((void)); +void gui_mch_newfont __ARGS((void)); void gui_mch_set_shellsize __ARGS((int width, int height, int min_width, int min_height, int base_width, int base_height, int direction)); void gui_mch_get_screen_dimensions __ARGS((int *screen_w, int *screen_h)); void gui_mch_settitle __ARGS((char_u *title, char_u *icon));